This documentation is archived and is not being maintained.

ObjectStateEntry::ApplyCurrentValues Method

Sets the current values of the entry to match the property values of a supplied object.

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

virtual void ApplyCurrentValues(
	Object^ currentEntity
) abstract


Type: System::Object
The detached object that has updated values to apply to the object. currentEntity can also be the object's entity key.


When currentEntity is nullptr.


When the key of the supplied object does not match the EntityKey property of the ObjectStateEntry.


When the ObjectStateEntry is an EntityKey entry.


When the object is not in the [T:System.Data.Objects.ObjectStateManager.]


The object is in either an Added, Deleted, or Detached state.


The entity key of the supplied object is invalid or has property changes.

The ApplyCurrentValues method sets the CurrentValues property of the ObjectStateEntry instance to match the values of the supplied object.

The ApplyCurrentValues method is used to apply changes that were made to objects outside the ObjectContext, such as detached objects that are received by a Web service.

.NET Framework

Supported in: 4

.NET Framework Client Profile

Supported in: 4

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.