ITrackEntityState.EntityState Property
Gets or sets a value that indicates the changed status of the entity.
Namespace: Microsoft.SharePoint.Linq
Assembly: Microsoft.SharePoint.Linq (in Microsoft.SharePoint.Linq.dll)
Syntax
'Declaration
Property EntityState As EntityState
Get
Set
'Usage
Dim instance As ITrackEntityState
Dim value As EntityState
value = instance.EntityState
instance.EntityState = value
EntityState EntityState { get; set; }
Property Value
Type: Microsoft.SharePoint.Linq.EntityState
An EntityState value that indicates the changed status of an entity.
Remarks
Important
Your code should not write to this property. It is used by the various *OnSubmit methods of the EntitySet<TEntity> class to indicate how an object representing a list item is treated by the next call of SubmitChanges().
Examples
In the following example, the call of InsertOnSubmit(TEntity) sets the bob object’s EntityState property to ToBeInserted.
DataContext teamSite = new DataContext("http://MarketingServer/SalesTeam");
// Create the new list item.
TeamMember bob = new TeamMember() { Title=”Bob Smith” };
// Set the item to be inserted.
teamSite.TeamMembers.InsertOnSubmit(bob);
// Write changes to the content database.
teamSite.SubmitChanges();