Ejemplo n.º 1
0
 /// <summary>
 /// 输出模型
 /// </summary>
 /// <param name="ShareDoctorDto"></param>
 /// <param name="ShareDoctorInfo"></param>
 public ShareDoctorOut(PagedResultDto <ShareDoctor> ShareDoctorDto, ShareDoctorIn ShareDoctorInfo)
 {
     Items          = ShareDoctorDto.Items;
     TotalCount     = ShareDoctorDto.TotalCount;
     TotalPage      = ShareDoctorDto.TotalCount / ShareDoctorInfo.MaxResultCount;
     SkipCount      = ShareDoctorInfo.SkipCount;
     MaxResultCount = ShareDoctorInfo.MaxResultCount;
 }
Ejemplo n.º 2
0
        public async Task <PagedResultDto <ShareDoctor> > ShareDoctorPage(ShareDoctorIn ShareDoctorInfo)
        {
            //初步过滤
            var query = _repository.GetAll().OrderByDescending(a => a.CreatedOn).Where(ShareDoctorInfo.Expression);
            //获取总数
            var tasksCount = query.Count();
            //获取总数
            var totalpage       = tasksCount / ShareDoctorInfo.MaxResultCount;
            var ShareDoctorList = await query.PageBy(ShareDoctorInfo.SkipTotal, ShareDoctorInfo.MaxResultCount).ToListAsync();

            return(new PagedResultDto <ShareDoctor>(tasksCount, ShareDoctorList.MapTo <List <ShareDoctor> >()));
        }
Ejemplo n.º 3
0
        public async Task <IList <ShareDoctor> > ShareDoctorList(ShareDoctorIn ShareDoctorInfo)
        {
            var ShareDoctors = await _repository.GetAllListAsync(ShareDoctorInfo.Expression);

            return(ShareDoctors.ToList());
        }