MergeOption

确定用于将实体发送到数据服务或从数据服务中接收实体的同步选项。 

Queries executed by the Entity Framework are evaluated against the data in the data source and the results will not reflect against the new objects in the object context. If an entity with the same identity as the one being queried for is already attached to the context, the data coming from the data source and the data already in the context are merged according to the MergeOptionof the query. To get the data that is in the cache, use the GetObjectStateEntries method on theObjectStateManager class. The ObjectStateManager manages the state of objects inside an object context, so if you want to get all the objects that were added, modified and unchanged, you can pass a bitwise OR of the following EntityState values to the GetObjectStateEntries method: Added, Modified, Unchanged. For more information see the blog that demonstrates how to perform local queries.

 

 

转载于:https://www.cnblogs.com/zjz008/archive/2010/04/05/1704497.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值