public async Task <PagedResultDto <YaeherPatientCollection> > YaeherPatientCollectionPage(YaeherPatientCollectionIn YaeherPatientCollectionInfo)
        {
            //初步过滤
            var query = _repository.GetAll().OrderByDescending(a => a.CreatedOn).Where(YaeherPatientCollectionInfo.Expression);
            //获取总数
            var tasksCount = query.Count();
            //获取总数
            var totalpage = tasksCount / YaeherPatientCollectionInfo.MaxResultCount;
            var YaeherPatientCollectionList = await query.PageBy(YaeherPatientCollectionInfo.SkipTotal, YaeherPatientCollectionInfo.MaxResultCount).ToListAsync();

            return(new PagedResultDto <YaeherPatientCollection>(tasksCount, YaeherPatientCollectionList.MapTo <List <YaeherPatientCollection> >()));
        }
Esempio n. 2
0
 /// <summary>
 /// 输出模型
 /// </summary>
 /// <param name="YaeherPatientCollectionDto"></param>
 /// <param name="YaeherPatientCollectionInfo"></param>
 public YaeherPatientCollectionOut(PagedResultDto <YaeherPatientCollection> YaeherPatientCollectionDto, YaeherPatientCollectionIn YaeherPatientCollectionInfo)
 {
     Items          = YaeherPatientCollectionDto.Items;
     TotalCount     = YaeherPatientCollectionDto.TotalCount;
     TotalPage      = YaeherPatientCollectionDto.TotalCount / YaeherPatientCollectionInfo.MaxResultCount;
     SkipCount      = YaeherPatientCollectionInfo.SkipCount;
     MaxResultCount = YaeherPatientCollectionInfo.MaxResultCount;
 }
        public async Task <IList <YaeherPatientCollection> > YaeherPatientCollectionList(YaeherPatientCollectionIn YaeherPatientCollectionInfoList)
        {
            var YaeherPatientCollections = await _repository.GetAllListAsync(YaeherPatientCollectionInfoList.Expression);

            return(YaeherPatientCollections.ToList());
        }