Ejemplo n.º 1
0
 public async Task Add(ICollection <T> entities)
 {
     foreach (var obj in entities)
     {
         EntityEntry dbEntity = Context.Entry(obj);
         if (dbEntity.State != EntityState.Detached)
         {
             dbEntity.State = EntityState.Added;
         }
     }
     await DBSet.AddRangeAsync(entities);
 }
Ejemplo n.º 2
0
 public virtual Task AddRangeAsync(TEntity entities)
 {
     return(DBSet.AddRangeAsync(entities));
 }
Ejemplo n.º 3
0
 public virtual Task AddRangeAsync(IEnumerable <TEntity> entities)
 {
     return(DBSet.AddRangeAsync(entities));
 }