Export (0) Print
Expand All
Expand Minimize

EntityState Enumeration

The state of an entity object.

This enumeration has a FlagsAttribute attribute that allows a bitwise combination of its member values.

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

[FlagsAttribute]
public enum class EntityState

Member nameDescription
DetachedThe object exists but it is not being tracked by Object Services. An entity is in this state immediately after it has been created and before it is added to the object context. An entity is also in this state after it has been removed from the context by calling the Detach method or if it is loaded using a NoTrackingMergeOption.
UnchangedThe object has not been modified since it was loaded into the context or since the last time that the SaveChanges method was called.
AddedThe object is added to the object context and the SaveChanges method has not been called. Objects are added to the object context by calling the AddObject method.
DeletedThe object is deleted from the object context by using the DeleteObject method.
ModifiedThe object is changed but the SaveChanges method has not been called.

The state of objects inside an object context is managed by the ObjectStateManager.

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

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

.NET Framework

Supported in: 3.5 SP1

Community Additions

ADD
Show:
© 2014 Microsoft