The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

DataServiceContext.Detach Method

Removes the entity from the list of entities that the DataServiceContext is tracking.

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

public bool Detach(
	Object entity


Type: System.Object
The tracked entity to be detached from the DataServiceContext.

Return Value

Type: System.Boolean
Returns true if the specified entity was detached; otherwise false.


When entity is null.

Once an object is detached, it is no longer tracked by the DataServiceContext.

The Detach method can be called to detach any object, regardless of its EntityStates.

After detaching the specified entity, this method also detaches any links related to the entity.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
© 2014 Microsoft