Files
Yi.Admin/CC.Yi/CC.Yi.BLL/T4BLL.cs

32 lines
884 B
C#
Raw Normal View History

2021-03-20 14:12:24 +08:00

using CC.Yi.IBLL;
using CC.Yi.IDAL;
using CC.Yi.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
2021-05-13 01:39:34 +08:00
using Microsoft.EntityFrameworkCore;
2021-03-20 14:12:24 +08:00
namespace CC.Yi.BLL
{
public partial class studentBll : BaseBll<student>, IstudentBll
{
2021-05-13 01:39:34 +08:00
public studentBll(IBaseDal<student> cd,DataContext _Db):base(cd,_Db)
2021-03-20 14:12:24 +08:00
{
CurrentDal = cd;
2021-06-02 20:00:25 +08:00
Db = _Db;
2021-03-20 14:12:24 +08:00
}
2021-06-02 20:00:25 +08:00
public async Task<bool> DelListByUpdateList(List<int> Ids)
2021-05-31 21:41:27 +08:00
{
2021-06-02 20:00:25 +08:00
var entitys = await CurrentDal.GetEntities(u => Ids.Contains(u.id)).ToListAsync();
foreach (var entity in entitys)
{
entity.is_delete = (short)ViewModel.Enum.DelFlagEnum.Deleted;
}
return Db.SaveChanges() > 0;
2021-05-31 21:41:27 +08:00
}
2021-06-02 20:00:25 +08:00
2021-05-31 21:41:27 +08:00
}
2021-03-20 14:12:24 +08:00
}