Part of the Entity Framework FAQ. 18.       Multi-threading 18.1.What is the recommendation for running a multithreaded application on Entity Framework?  Is Entity Framework thread-safe? Entity Framework, like most of the rest of the .Net framework, is by and large NOT thread-safe. So if you want to interact with the entity framework or your entity classes…


Entity Services, Metadata & Mapping

Part of the Entity Framework FAQ. 13.       EDM 13.1.Does Entity Framework support Abstract types in EDM models? In Entity Framework it is possible to declare Abstract types in EDM model (csdl file) — i.e. no entity instances can be created for these types, but types can be derived from them.  In fact, types can be…


Object Services & Using the APIs

Part of the Entity Framework FAQ. 9.   Object Services 9.1.   What is ObjectContext.Detach() method used for? ObjectContext.Detach() — will detach an object from the ObjectStateManager associated with an object context so that it can be attached to some other context or reclaimed by the garbage collector. For more information, see Detaching Objects (Entity Framework). 9.2.  …



Part of the Entity Framework FAQ. 6.   Query 6.1.   How is Span used?  What is Span?  (aka. How does the EF support eager-loading?) The span feature makes it possible to pre-fetch related entities.  Span can be defined as a builder method, “Include”, which makes it simpler to specify span rules in LINQ to Entities queries….


Entity Classes & Architecture Patterns

Part of the Entity Framework FAQ. 2.   Architecture and Patterns 2.1.   Does Entity Framework have support for entity objects being responsible to save changes themselves (rather than a central Save method on object context)? This is something we considered but in the end rejected in favor of the broader “unit of work” pattern where you…


Entity Framework FAQ

The EF FAQ has moved (and been updated substantially).  It can now be found at http://www.ef-faq.org/