MergeOption 列舉

定義

決定傳送實體至 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
繼承
MergeOption

欄位

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 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 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 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.

適用於