Exemple #1
0
 /// <summary>
 /// 批量删除
 /// </summary>
 /// <returns><c>true</c>, if delete was batched, <c>false</c> otherwise.</returns>
 /// <param name="entity">Entity.</param>
 public bool BatchDelete(List <T> entity)
 {
     //_context.Remove(entity);
     //foreach (var item in entity)
     //{
     //    _context.Remove(item);
     //}
     _context.RemoveRange(entity);
     //_context.SaveChanges();
     return(SaveChanges());
 }