Explorar o código

完善MES仓储

Murphy %!s(int64=2) %!d(string=hai) anos
pai
achega
091377abb1

+ 2 - 0
MicroServices/Business/Business.EntityFrameworkCore/Repository/SqlRepositories/ISqlRepository.cs

@@ -19,6 +19,8 @@ namespace Business.EntityFrameworkCore.SqlRepositories
 
         int Delete(Expression<Func<T, bool>> whereLambda);
 
+        int Delete(List<T> entitylist);
+
         bool IsExist(Expression<Func<T, bool>> whereLambda);
 
         List<T> Select();

+ 6 - 0
MicroServices/Business/Business.EntityFrameworkCore/Repository/SqlRepositories/SqlRepository.cs

@@ -59,6 +59,12 @@ namespace Business.EntityFrameworkCore.SqlRepositories
             return  _dbContext.SaveChanges();
         }
 
+        public int Delete(List<T> entitylist)
+        {
+            _dbContext.Set<T>().RemoveRange(entitylist);
+            return _dbContext.SaveChanges();
+        }
+
         public  bool IsExist(Expression<Func<T, bool>> whereLambda)
         {
             return  _dbContext.Set<T>().Any(whereLambda);