public async Task <IList <DoctorCheck> > DoctorCheckList(DoctorCheckIn DoctorCheckInfo) { //初步过滤 var DoctorChecks = _repository.GetAll().OrderByDescending(a => a.CreatedOn).Where(DoctorCheckInfo.Expression); return(await DoctorChecks.ToListAsync()); }
public async Task <PagedResultDto <DoctorCheck> > DoctorCheckPage(DoctorCheckIn DoctorCheckInfo) { //初步过滤 var query = _repository.GetAll().OrderByDescending(a => a.CreatedOn).Where(DoctorCheckInfo.Expression); //获取总数 var tasksCount = query.Count(); //获取总数 var totalpage = tasksCount / DoctorCheckInfo.MaxResultCount; var DoctorCheckList = await query.PageBy(DoctorCheckInfo.SkipTotal, DoctorCheckInfo.MaxResultCount).ToListAsync(); return(new PagedResultDto <DoctorCheck>(tasksCount, DoctorCheckList.MapTo <List <DoctorCheck> >())); }