ObjectSet<TEntity>.Detach Method (TEntity)
Removes the object from the object context.
Assembly: EntityFramework (in EntityFramework.dll)
Parameters
- entity
-
Type:
TEntity
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.