DataServiceContext.Detach(Object) Method

Definition

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

public virtual bool Detach (object entity);
abstract member Detach : obj -> bool
override this.Detach : obj -> bool
Public Overridable Function Detach (entity As Object) As Boolean

Parameters

entity
Object

The tracked entity to be detached from the DataServiceContext.

Returns

Returns true if the specified entity was detached; otherwise false.

Exceptions

When entity is null.

Applies to