服务上下文和对象上下文有什么区别?
我无法理解服务上下文和对象上下文之间的区别。
我的意思是,它们用在哪里?基本区别是什么?
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 difference?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
而
对象服务是实体框架的一个组件,使您能够查询、插入、更新和删除数据,这些数据表示为作为实体类型实例的强类型 CLR 对象。对象服务支持针对实体数据模型 (EDM) 中定义的类型的语言集成查询 (LINQ) 和实体 SQL 查询。对象服务将返回的数据具体化为对象,并将对象更改传播回数据源。它还提供了跟踪更改、将对象绑定到控件以及处理并发性的功能。对象服务由 System.Data.Objects 和 System.Data.Objects.DataClasses 命名空间。
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.