ObjectContext.ApplyPropertyChanges(String, Object) 方法

定义

注意

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 或空字符串时,或者更改时为 null。

EntitySet当 from entitySetName 与对象的 EntityKey 不匹配EntitySet时,或者当实体处于或 以外的ModifiedUnchanged状态时,或者原始对象未附加到上下文时。

当 changed 对象的类型与原始对象的类型不同时。

适用于