Share via


EntityStates Enum

Definition

Describes the insert/update/delete state of an entity or link.

This enumeration supports a bitwise combination of its member values.

[System.Flags]
public enum EntityStates
[<System.Flags>]
type EntityStates = 
Public Enum EntityStates
Inheritance
EntityStates
Attributes

Fields

Name Value Description
Detached 1

The resource is not tracked by the context.

Unchanged 2

The resource is tracked by a context with no changes.

Added 4

The resource is tracked by a context for insert.

Deleted 8

The resource is tracked by a context for deletion.

Modified 16

The resource is tracked by a context for update.

Remarks

Deleting an inserted resource will detach it. After SaveChanges, deleted resources will become detached and Added & Modified resources will become unchanged.

Applies to