语言

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或实体处于其他Modified状态或Unchanged原始对象未附加到上下文时。

更改对象的类型与原始对象的类型不同时。

适用于