/// <summary> /// 批量删除实体 /// </summary> /// <param name="entityList"></param> public virtual void BatchDelete(List <T> entityList) { using (DbBase DbContext = new DbBase(connectionName)) { //自动新增事务处理 using (var tran = DbContext.GetDbTransaction()) { DbContext.DeleteBatch <T>(entityList, tran); tran.Commit(); } DbContext.CloseConnection(); } }