The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
ObjectContext::ApplyCurrentValues<TEntity> Method (String^, TEntity)
Entity Framework 6.0
Copies the scalar values from the supplied object into the object in the ObjectContext that has the same key.
Assembly: EntityFramework (in EntityFramework.dll)
public: generic<typename TEntity> where TEntity : ref class virtual TEntity ApplyCurrentValues( String^ entitySetName, TEntity currentEntity )
Parameters
- entitySetName
-
Type:
System::String^
The name of the entity set to which the object belongs.
- currentEntity
-
Type:
TEntity
The detached object that has property updates to apply to the original object. The entity key of currentEntity must match the EntityKey property of an entry in the ObjectContext .
Type Parameters
- TEntity
The entity type of the object.
| Exception | Condition |
|---|---|
| ArgumentNullException | entitySetName or current is null. |
| InvalidOperationException | The EntitySet from entitySetName does not match the EntitySet of the object EntityKey or the object is not in the ObjectStateManager or it is in a Detached state or the entity key of the supplied object is invalid. |
| ArgumentException | entitySetName is an empty string. |
Show: