共用方式為


EntityList<TEntity>.DeleteAllOnSubmit Method

Marks the specified entities for deletion on the next call of SubmitChanges().

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

Syntax

'Declaration
Public Sub DeleteAllOnSubmit ( _
    entities As IEnumerable(Of TEntity) _
)
'Usage
Dim instance As EntityList
Dim entities As IEnumerable(Of TEntity)

instance.DeleteAllOnSubmit(entities)
public void DeleteAllOnSubmit(
    IEnumerable<TEntity> entities
)

Parameters

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.

Remarks

entities are usually a list items, but one or more can be a detached entities of the same type as the list items.

See Also

Reference

EntityList<TEntity> Class

EntityList<TEntity> Members

Microsoft.SharePoint.Linq Namespace