Maintains state and key information for objects and relationships and change tracking for object properties.
Assembly: System.Data.Entity (in System.Data.Entity.dll)
Thetype exposes the following members.
|CurrentValues||Gets the current property values of the object or relationship associated with this .|
|Entity||Gets the object associated with this .|
|EntityKey||Gets the EntityKey associated with the .|
|EntitySet||Gets the EntitySetBase for the object or relationship associated with this .|
|IsRelationship||Gets a Boolean value that indicates whether this represents a relationship.|
|ObjectStateManager||Gets the ObjectStateManager for this .|
|OriginalValues||Gets the read-only version of original values of the object or relationship associated with this . To get updatable original values, use GetUpdatableOriginalValues.|
|RelationshipManager||Returns a RelationshipManager instance for the object represented by entry.|
|State||Gets the state of this .|
|AcceptChanges||Accepts the current values as original values.|
|ApplyCurrentValues||Sets the current values of the entry to match the property values of a supplied object.|
|ApplyOriginalValues||Sets the original values of the entry to match the property values of a supplied object.|
|ChangeState||Changes state of the entry to the specified EntityState value.|
|Delete||Marks an entity as deleted.|
|Equals(Object)||Determines whether the specified Object is equal to the current Object. (Inherited from Object.)|
|Finalize||Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)|
|GetHashCode||Serves as a hash function for a particular type. (Inherited from Object.)|
|GetModifiedProperties||Returns the names of an object's properties that have changed since the last time SaveChanges was called.|
|GetType||Gets the Type of the current instance. (Inherited from Object.)|
|GetUpdatableOriginalValues||Gets the updatable version of original values of the object associated with this .|
|MemberwiseClone||Creates a shallow copy of the current Object. (Inherited from Object.)|
|SetModified||Sets the state of the object or relationship to Modified.|
|SetModifiedProperty||Marks the specified property as modified.|
|ToString||Returns a string that represents the current object. (Inherited from Object.)|
|IEntityChangeTracker.EntityComplexMemberChanged||Notifies the state manager that a complex property has changed.|
|IEntityChangeTracker.EntityComplexMemberChanging||Notifies the state manager that a complex property has a pending change.|
|IEntityChangeTracker.EntityMemberChanged||Notifies the state manager that a property has changed.|
|IEntityChangeTracker.EntityMemberChanging||Notifies the state manager that a property has a pending change.|
|IEntityChangeTracker.EntityState||Gets the EntityState for the .|
There is an instance of an associated with each entity type relationship instance. An object is associated with an only if it is in the ObjectStateManager.
When an object that has a relationship is detached, the information maintained by the is reduced to only what is required to maintain the relationship.
An cannot have the same key as another in the same ObjectStateManager.
The key values of a persisted entity cannot be modified. Entities in the unchanged, modified, and deleted states are persisted entities.
The example in this topic is based on the Adventure Works Sales Model. The example gets the for the given EntityKey from the ObjectStateManager. Then it gets the current value of SalesOrderHeader.PurchaseOrderNumber property, changes the property's value, and enumerates through the collection of modified properties.
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.