DataServiceContext.DeleteObject Method (Object)

 

Changes the state of the specified object to be deleted in the DataServiceContext.

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

public void DeleteObject(
	object entity
)

Parameters

entity
Type: System.Object

The tracked entity to be changed to the deleted state.

Exception Condition
ArgumentNullException

When entity is null.

InvalidOperationException

When the object is not being tracked by the DataServiceContext.

All links to the specified entity are also marked deleted.

.NET Framework
Available since 3.5
Silverlight
Available since 2.0
Return to top
Show: