Export (0) Print
Expand All

EntityState enumeration

Records the changed state of an entity (usually a list item; but possibly a detached entity).

Namespace:  Microsoft.SharePoint.Linq
Assembly:  Microsoft.SharePoint.Linq (in Microsoft.SharePoint.Linq.dll)

[DataContractAttribute]
public enum EntityState

Member nameDescription
UnchangedThe entity is not changed.
ToBeInsertedThe entity will be inserted into a list.
ToBeUpdatedThe entity will be updated.
ToBeRecycledThe entity will be recycled.
ToBeDeletedThe entity will be deleted.
DeletedThe entity has been deleted or recycled.

This type is used as the value of the EntityState property of entities that implement ITrackEntityState. The property is typically only written to by one of the *OnSubmit methods of EntityList<TEntity>. But changing the value of any property of an entity object that represents a list item will also cause EntityState to be assigned ToBeUpdated.

The states whose names begin with “ToBe”, such as ToBeDeleted indicate what is to happen to the entity on the next call of SubmitChanges().

Show:
© 2014 Microsoft