EntityList<TEntity>.InsertAllOnSubmit Method
Marks the specified entities for insertion into the list on the next call of SubmitChanges().
Namespace: Microsoft.SharePoint.Linq
Assembly: Microsoft.SharePoint.Linq (in Microsoft.SharePoint.Linq.dll)
Syntax
'Declaration
Public Sub InsertAllOnSubmit ( _
entities As IEnumerable(Of TEntity) _
)
'Usage
Dim instance As EntityList
Dim entities As IEnumerable(Of TEntity)
instance.InsertAllOnSubmit(entities)
public void InsertAllOnSubmit(
IEnumerable<TEntity> entities
)
Parameters
entities
Type: System.Collections.Generic.IEnumerable<TEntity>The entities to be inserted.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | At least one member of entities is a null reference (Nothing in Visual Basic). |
InvalidOperationException | Object tracking is not enabled for the DataContext object. - or - At least one member of entities is not of the same type as the list items. - or - At least one member of entities has been deleted. - or - At least one member of entities has been updated. - or - There is a problem with the internal ID of at least one member of entities that is used by the object tracking system. |
Remarks
entities are usually a list items, but one or more can be a detached entities of the same type as the list items.