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.
ObjectContext::Detach Method (Object^)
Entity Framework 6.0
Removes the object from the object context.
Assembly: EntityFramework (in EntityFramework.dll)
Parameters
- entity
-
Type:
System::Object^
Object to be detached. Only the entity is removed; if there are any related objects that are being tracked by the same ObjectStateManager , those will not be detached automatically.
| Exception | Condition |
|---|---|
| ArgumentNullException | The entity is null. |
| InvalidOperationException | The entity is not associated with this ObjectContext (for example, was newly created and not associated with any context yet, or was obtained through some other context, or was already detached). |
Show: