EntityCollection<TEntity>::Clear Method ()
.NET Framework (current version)
Removes all entities from the collection.
Assembly: System.Data.Entity (in System.Data.Entity.dll)
Clear does the following:
Sets the IsLoaded flag to false.
Removes all entities from the collection.
Detaches relationships between removed entities and the owner of the EntityCollection<TEntity> from the ObjectStateManager.
Removes the owner of the EntityCollection<TEntity> from the related entities.
.NET Framework
Available since 3.5
Available since 3.5
Show: