ObjectContext.ApplyPropertyChanges Method (String, Object)

 
Note: This API is now obsolete.

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

Namespace:   System.Data.Entity.Core.Objects
Assembly:  EntityFramework (in EntityFramework.dll)

[ObsoleteAttribute("Use ApplyCurrentValues instead")]
[EditorBrowsableAttribute(EditorBrowsableState.Never)]
[BrowsableAttribute(false)]
public virtual void ApplyPropertyChanges(
	string entitySetName,
	object changed
)

Parameters

entitySetName
Type: System.String

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

changed
Type: System.Object

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

Exception Condition
ArgumentNullException

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

InvalidOperationException

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.

ArgumentException

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