Describes the state of an entity.
This enumeration has a FlagsAttribute attribute that allows a bitwise combination of its member values.
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1714:FlagsEnumsShouldHavePluralNames")] [System.Flags] public enum EntityState
type EntityState =
Public Enum EntityState
The entity is being tracked by the context but does not yet exist in the database.
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.
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.
The entity is being tracked by the context and exists in the database, and some or all of its property values have been modified.
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.