Share via


ObjectContext.ApplyPropertyChanges(String, Object) Method

Definition

Caution

Use ApplyCurrentValues instead

Applies property changes from a detached object to an object already attached to the object context.

[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)

Parameters

entitySetName
String

The name of the entity set to which the object belongs.

changed
Object

The detached object that has property updates to apply to the original object.

Attributes

Exceptions

When entitySetName is null or an empty string or when changed is null.

When the EntitySet from entitySetName does not match the EntitySet of the object EntityKey or when the entity is in a state other than Modified or Unchanged or the original object is not attached to the context.

When the type of the changed object is not the same type as the original object.

Applies to