I am having trouble in understanding what is the difference between the service context and the object context.
I mean, where are they used? What is the basic diffe开发者_StackOverflow社区rence?
ObjectContext
is a class that is generated inside the generatedDomainService
class that you made.
while
Object Services is a component of the Entity Framework that enables you to query, insert, update, and delete data, expressed as strongly typed CLR objects that are instances of entity types. Object Services supports both Language-Integrated Query (LINQ) and Entity SQL queries against types that are defined in an Entity Data Model (EDM). Object Services materializes returned data as objects, and propagates object changes back to the data source. It also provides facilities for tracking changes, binding objects to controls, and handling concurrency. Object Services is implemented by classes in the System.Data.Objects and System.Data.Objects.DataClasses namespaces.
精彩评论