NewGaoKaoApi/New_College.Repository/BASE/D_PlanMajorDescRepository.cs

37 lines
1.1 KiB
C#

using New_College.IRepository;
using New_College.IRepository.UnitOfWork;
using New_College.Model.Models;
using New_College.Repository.Base;
using System.Collections.Generic;
using System.Diagnostics;
using System.Threading.Tasks;
namespace New_College.Repository
{
/// <summary>
/// D_PlanMajorDescRepository
/// </summary>
public class D_PlanMajorDescRepository : BaseRepository<D_PlanMajorDesc>, ID_PlanMajorDescRepository
{
public D_PlanMajorDescRepository(IUnitOfWork unitOfWork) : base(unitOfWork)
{
}
/// <summary>
///
/// </summary>
/// <param name="majorDescs"></param>
/// <returns></returns>
public async Task<bool> Batchupdate(List<D_PlanMajorDesc> majorDescs)
{
// int k = this.Db.Updateable(majorDescs).ExecuteCommand();
// this.Db.Fastest<D_PlanMajorDesc>().BulkUpdate(GetList()) //适合大批量更新
var kk = await this.Db.Fastest<D_PlanMajorDesc>().BulkUpdateAsync(majorDescs);
return kk > 0;
}
}
}