Esempio n. 1
0
 /// <summary>
 /// Deletes the entities.
 /// </summary>
 /// <param name="entitiesToDelete">The entities to delete.</param>
 /// <param name="dataAccessAdapter">The data access adapter.</param>
 /// <returns></returns>
 public static int DeleteEntities(IEnumerable entitiesToDelete, IDataAccessAdapter dataAccessAdapter)
 {
     if (entitiesToDelete is IEntityCollection2)
     {
         return(dataAccessAdapter.DeleteEntityCollection((IEntityCollection2)entitiesToDelete));
     }
     return(DeleteEntities(entitiesToDelete.Cast <IEntity2>(), dataAccessAdapter));
 }