src/Shared/EntityFramework/Core/Objects/ObjectSet.cs
/// <summary>Removes the object from the object context.</summary>
/// <param name="entity">
/// Object to be detached. Only the  entity  is removed; if there are any related objects that are being tracked by the same
/// <see
///     cref="T:System.Data.Entity.Core.Objects.ObjectStateManager" />
/// , those will not be detached automatically.
/// </param>
Removes the object from the object context.
Removes the object from the object context .
public void Detach(TEntity entity)
        {
            Context.Detach(entity, EntitySet);
        }
public void Detach ( TEntity entity ) { Context . Detach ( entity , EntitySet ) ; }
Removes the object from the object context.
Removes the object from the object context .
// this method is expected to behave exactly like ObjectContext.Detach -- see devnote at the top of this class // Note that in this case we use an internal Detach overload so we can have the context validate // the EntitySet after it verifies that the specified object is in the context at all.
entity
TEntity
Object to be detached. Only the  entity  is removed; if there are any related objects that are being tracked by the same

, those will not be detached automatically.
Object to be detached . Only the entity is removed ; if there are any related objects that are being tracked by the same those will not be detached automatically .