Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Since its first release, the most critical element in Entity Framework
has been the ObjectContext. It is this
class that allows us to interact with a database using a conceptual model.
The context lets us express and execute queries, track changes to objects
and persist those changes back to the database. The ObjectContext class interacts with other important
Entity Framework classes such as the ObjectSet, which enables set operations on our
entities in memory, and ObjectQuery,
which is the brains behind executing queries. All of these classes are
replete with features and functionality—some of it complex and much of it
only necessary for special cases. After two iterations of Entity Framework
(in .NET 3.5 SP1 and .NET 4) it was clear that developers were most commonly
using a subset of the features, and unfortunately, some of the tasks we
needed to do most frequently were difficult to discover and code.