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)

Syntax

'Declaration
<DataContractAttribute> _
Public Enumeration EntityState
'Usage
Dim instance As EntityState
[DataContractAttribute]
public enum EntityState

Members

Member name Description
Unchanged The entity is not changed.
ToBeInserted The entity will be inserted into a list.
ToBeUpdated The entity will be updated.
ToBeRecycled The entity will be recycled.
ToBeDeleted The entity will be deleted.
Deleted The entity has been deleted or recycled.

Remarks

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().

See Also

Reference

Microsoft.SharePoint.Linq Namespace