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

Added 4

The resource is tracked by a context for insert.

Deleted 8

The resource is tracked by a context for deletion.

Detached 1

The resource is not tracked by the context.

Modified 16

The resource is tracked by a context for update.

Unchanged 2

The resource is tracked by a context with no changes.

Remarks

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

Applies to