Compartilhar via


EntityList<TEntity>.RecycleOnSubmit Method

Marks the specified entity to be put in the Recycle Bin on the next call of SubmitChanges().

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

Syntax

'Declaration
Public Sub RecycleOnSubmit ( _
    entity As TEntity _
)
'Usage
Dim instance As EntityList
Dim entity As TEntity

instance.RecycleOnSubmit(entity)
public void RecycleOnSubmit(
    TEntity entity
)

Parameters

  • entity
    Type: TEntity

    The entity to be recycled.

Exceptions

Exception Condition
ArgumentNullException

entity is a null reference (Nothing in Visual Basic).

InvalidOperationException

Object tracking is not enabled for the DataContext object.

- or -

entity is not of the same type as the list items.

Remarks

entity is usually a list item, but it can be a detached entity of the same type as the list items.

See Also

Reference

EntityList<TEntity> Class

EntityList<TEntity> Members

Microsoft.SharePoint.Linq Namespace