ObjectContext.ApplyPropertyChanges(String, Object) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
警告
Use ApplyCurrentValues instead
將屬性變更從分離物件套用到已附加於物件上下文的物件。
[System.ComponentModel.Browsable(false)]
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
[System.Obsolete("Use ApplyCurrentValues instead")]
public virtual void ApplyPropertyChanges(string entitySetName, object changed);
abstract member ApplyPropertyChanges : string * obj -> unit
override this.ApplyPropertyChanges : string * obj -> unit
Public Overridable Sub ApplyPropertyChanges (entitySetName As String, changed As Object)
參數
- entitySetName
- String
物件所屬實體集合的名稱。
- changed
- Object
分離物件中帶有屬性的更新,並套用到原始物件上。
- 屬性
例外狀況
當 entitySetName 為 null 或為空字串,或 change 為 null 時,
當 EntitySet from entitySetName 與物件EntityKey的 不符EntitySet,或實體處於非 Modified 或 狀態Unchanged,或原始物件未附加於上下文時,
當變更物件的類型與原始物件不同時,