MergeOption MergeOption MergeOption MergeOption Enum

定义

确定用于将实体发送至 WCF Data Services 或从后者接收实体的同步选项。Determines the synchronization option for sending or receiving entities to or from WCF Data Services.

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

字段

AppendOnly AppendOnly AppendOnly AppendOnly 0

仅追加新实体。Append new entities only. 将不会修改现有实体或其原始值。Existing entities or their original values will not be modified. 客户端更改在该合并中不会丢失。No client-side changes are lost in this merge. 这是默认行为。This is the default behavior.

NoTracking NoTracking NoTracking NoTracking 3

对象始终从保留的存储进行加载。Objects are always loaded from persisted storage. 数据源值会重写在对象上下文中对对象所做的任何属性更改。Any property changes made to objects in the object context are overwritten by the data source values.

OverwriteChanges OverwriteChanges OverwriteChanges OverwriteChanges 1

客户端上的所有值都会被数据服务中的当前值覆盖,无论其是否已在客户端上更改。All current values on the client are overwritten with current values from the data service regardless of whether they have been changed on the client.

PreserveChanges PreserveChanges PreserveChanges PreserveChanges 2

已在客户端上更改的当前值不会被修改,但任何未更改的值都会更新为数据服务中的当前值。Current values that have been changed on the client are not modified, but any unchanged values are updated with current values from the data service. 客户端更改在该合并中不会丢失。No client-side changes are lost in this merge.

注解

此值在具体化对象时使用。This value is used when materializing objects. 在对数据服务执行任何查询或更新之前,将此属性设置为适当的具体化选项。Set this property to the appropriate materialization option before executing any queries or updates to the data service. 默认值为 MergeOption.AppendOnlyThe default value is MergeOption.AppendOnly.

适用于

另请参阅