Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

EntityState Enumeration

 

Describes the state of an entity.

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

[FlagsAttribute]
[SuppressMessageAttribute("Microsoft.Naming", "CA1714:FlagsEnumsShouldHavePluralNames")]
public enum EntityState

Member nameDescription
Added

The entity is being tracked by the context but does not yet exist in the database.

Deleted

The entity is being tracked by the context and exists in the database, but has been marked for deletion from the database the next time SaveChanges is called.

Detached

The entity is not being tracked by the context. An entity is in this state immediately after it has been created with the new operator or with one of the DbSet Create methods.

Modified

The entity is being tracked by the context and exists in the database, and some or all of its property values have been modified.

Unchanged

The entity is being tracked by the context and exists in the database, and its property values have not changed from the values in the database.

Return to top
Show:
© 2015 Microsoft