objectcontext
How to load navigation properties using POCO Entities in EF by having managed lifespan ObjectContext?
I am following the same article as follows Managing Entity Framework ObjectContext lifespan. I generate the Entities from my EDMX file by using \"POCO Entity Generator\" tool and put all the Entities[详细]
2023-04-10 23:28 分类:问答unable to query EntityFramework shared dbcontext reliably
I\'m trying to share a simple DbContext with 4 DbSets among multiple repositories, each of my repositories inherit from this base class[详细]
2023-04-10 21:40 分类:问答ObjectContext and Caching Per Request - Getting ObjectDisposedException
I\'m using an ObjectContext and storing it in HttpContext.Current.Items collection.I share the ObjectContext for a single request, but the framework also enables the ability to load a fresh, non-cache[详细]
2023-04-10 10:30 分类:问答Entity Framework - Crash on Detaching list of objects
I am working on a winform application with EF 4.0. Below code, crashes with issue \'The object cannot be detached because it is not attached to the ObjectStateManager.\' when it tries to detach the l[详细]
2023-04-09 00:40 分类:问答GetTable equivalent for ObjectContext
I was previously using a DataContext which had a GetTable(type) method to get tables generically.Example:[详细]
2023-04-01 08:17 分类:问答ObjectContext update an object from a detached state
I have an ObjectContext with an update method.The method takes a generic object as a parameter.I need to attach this object to the ObjectContext and update the database with the changes the object had[详细]
2023-03-31 23:17 分类:问答Entity Framework 4 - Embed ObjectContext reference within generated Entities
I am new to Entity Framework 4.0, using it with C#, and currently experimenting with its features. What I noticed is that, like with most similar ORMs, it relies on an Context object to deal with the[详细]
2023-03-29 09:20 分类:问答Using Both ObjectContext and DbContext
Scenario: Trying to extract and rearange information from one database to an other. DB A has some data I want to get. I want to store it on DB B in a slightly different structure.[详细]
2023-03-27 11:10 分类:问答Global ObjectContext or local one?
I\'m starting with the Entity Framework and the repository pattern. I\'m confused about the ObjectContext.[详细]
2023-03-24 20:09 分类:问答C# Entity Framework using only one ObjectContext per HttpContext
In ASP.NET MVC 2, using Entity Framework 4,I\'m getting this error \"An entity object cannot be referenced by multiple instances of IEntityChangeTracker\".[详细]
2023-03-20 08:54 分类:问答