Aracılığıyla paylaş


DataServiceContext.DeleteObject Method

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Changes the state of the specified object to Deleted in the DataServiceContext.

Namespace:  System.Data.Services.Client
Assembly:  System.Data.Services.Client (in System.Data.Services.Client.dll)

Syntax

'Declaration
Public Sub DeleteObject ( _
    entity As Object _
)
public void DeleteObject(
    Object entity
)

Parameters

Exceptions

Exception Condition
ArgumentNullException

When entity is nulla null reference (Nothing in Visual Basic).

InvalidOperationException

When entity is not being tracked by the context.

Remarks

All links to the specified entity are also marked Deleted.

Examples

For examples that use the DeleteObject method, see Modifying and Deleting Entity Data (WCF Data Services/Silverlight).

Version Information

Silverlight

Supported in: 5, 4, 3

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.