RefreshMode 枚举

定义

指定是保留对由对象服务跟踪的对象所做的属性更改,还是使用数据源中的属性值替换这些更改。Specifies whether property changes made to objects tracked by Object Services are kept or replaced with property values from the data source.

public enum class RefreshMode
public enum RefreshMode
type RefreshMode = 
Public Enum RefreshMode
继承
RefreshMode

字段

ClientWins 2

不使用数据源中的值替换在对象上下文中对对象所做的属性更改。Property changes made to objects in the object context are not replaced with values from the data source. 在下一次调用 SaveChanges() 时,这些更改会发送到数据源。On the next call to SaveChanges(), these changes are sent to the data source.

StoreWins 1

使用数据源中的值替换在对象上下文中对对象所做的属性更改。Property changes made to objects in the object context are replaced with values from the data source.

示例

保存更改和管理并发Saving Changes and Managing Concurrency

如何:在对象上下文中管理数据并发How to: Manage Data Concurrency in the Object Context

适用于