DataServiceContext.Detach(Object) Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Removes the entity from the list of entities that the DataServiceContext is tracking.
public:
bool Detach(System::Object ^ entity);
public bool Detach(object entity);
member this.Detach : obj -> bool
Public Function Detach (entity As Object) As Boolean
- entity
- Object
The tracked entity to be detached from the DataServiceContext.
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.
Product | Versions |
---|---|
.NET Framework | 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET feedback
.NET is an open source project. Select a link to provide feedback: