In Entity Framework 4.1 and higher there is a new context called DbContext.
wraps ObjectContext and exposes the most commonly used features of ObjectContext by using simplified and more intuitive APIs. You can access the underlying ObjectContext whenever you need to use features that are not supported by DbContext. For more information, see What’s Not Supported.
CSLA has a ObjectContextManager too reuse a object context while within a single data portal operation. Now this doesn't work having a DbContext as it wraps functionality and only introduces commonly used features.
Is it an idea to create a new class called DbContextManager<C> or perhaps it's not needed at all when using an IoC like unityContainer with a containercontrolled lifetimemanager or Autofac.
Thanks for the information. I'll add this to the wish list, because yes, there should be a DbContextManager type in Csla.Data.
We'll have to think about when to add it, because it will couple CSLA to EF 4.1, at least to some degree.
Copyright (c) Marimer LLC