EntityObject.EntityState Property


Gets the entity state of the object.

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

member EntityState : EntityState with get

Property Value

Type: System.Data.EntityState

The EntityState of this object.

When an object is attached to the object context, either as the result of a query or by calling Attach, the EntityState becomes Unchanged.

When an object is detached from the object context, it returns to the Detached state.

.NET Framework
Available since 3.5
Return to top