This topic has not yet been rated - Rate this topic

DataServiceContext.Detach Method

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

Namespace:  System.Data.Services.Client
Assembly:  System.Data.Services.Client (in System.Data.Services.Client.dll)
public bool Detach(
	Object entity
)

Parameters

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.
ExceptionCondition
ArgumentNullException

When entity is null.

After an entity is detached, it is unaffected by operations in the DataServiceContext.

Any entity being tracked by the DataServiceContext, whether in the added, modified, deleted, or unchanged state, the entity may be detached.

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

Silverlight

Supported in: 5, 4, 3

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

Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.