public static void RemoveAllEntities(this IEntityCollection entityCollection) { var entities = entityCollection.ToArray(); for (var i = 0; i < entities.Length; i++) { entityCollection.RemoveEntity(entities[i].Id); } }
public static void RemoveAllEntities(this IEntityCollection entityCollection) { var entities = entityCollection.ToArray(); foreach (var entity in entities) { entityCollection.RemoveEntity(entity.Id); } }