Example #1
0
        public async Task <PagedResultDto <DoctorServiceLog> > DoctorServiceLogPage(DoctorServiceLogIn DoctorServiceLogInfo)
        {
            //初步过滤
            var query = _repository.GetAll().Where(DoctorServiceLogInfo.Expression);
            //获取总数
            var tasksCount = query.Count();
            //获取总数
            var totalpage            = tasksCount / DoctorServiceLogInfo.MaxResultCount;
            var DoctorServiceLogList = await query.PageBy(DoctorServiceLogInfo.SkipTotal, DoctorServiceLogInfo.MaxResultCount).ToListAsync();

            return(new PagedResultDto <DoctorServiceLog>(tasksCount, DoctorServiceLogList.MapTo <List <DoctorServiceLog> >()));
        }
Example #2
0
        public async Task <IList <DoctorServiceLog> > DoctorServiceLogList(DoctorServiceLogIn DoctorServiceLogInfo)
        {
            var DoctorServiceLogs = await _repository.GetAllListAsync(DoctorServiceLogInfo.Expression);

            return(DoctorServiceLogs.ToList());
        }