Telerik blogs
  • Web

    Simplifying OpenAccess Scope in ASP.NET with HttpModule

    Whenever you start working with a modern ORM tool, one of the biggest challenges is figuring out how to manage the "scope" (or sometimes called "context" or "data context"). It is this transactional space where the ORM tool keeps track of changes being made to "persistent objects" in your application so that they can be saved to your "persistence layer" (usually a database) when you're ready to commit them. But figuring out when to create a scope, when to close it, and all the annoying problems that result from closing a scope too early can be very frustrating, and they...
    January 20, 2009
  • Release

    Improving OpenAccess ObjectScopeProvider for Runtime Connection Config

    Phew! That's a long blog post title, but hopefully it clearly conveys what I'm about to show you. In my last post, I talked about where you should set your OpenAccess database connection strings. I showed you how you can define multiple database connections in your web.config (or app.config), simulating the idea of having a unique connection string for DEV, TEST, and PROD environments. So now that you have your connection strings set in a way that is easy to maintain, you need a way to easily to tell your OpenAccess persistent classes to use a specific connection at runtime. Let's look...
    January 09, 2009
  • Productivity

    Understanding Where to Set Connection Strings in OpenAccess

    When you start working with OpenAccess, one of the first tasks you're going to face is the need set a connection string to your database. And odds are, the connection string you're going to start with is not going to be the connection string your going to use on your production server. It might not even be the connection string your going to use in your test environment. Point is, you need to be able to store multiple connection strings and easily "cue" OpenAccess to use the correct connection details at runtime. Fortunately, OpenAccess makes this easy.   UNDERSTANDING OPENACCESS CONNECTIONS First things first:...
    January 07, 2009