示例#1
0
        public async Task <PagedResultDto <YaeherOperList> > YaeherOperListPage(YaeherOperListIn YaeherOperListInfo)
        {
            //初步过滤
            var query = _repository.GetAll().OrderByDescending(a => a.CreatedOn).Where(YaeherOperListInfo.Expression);
            //获取总数
            var tasksCount = query.Count();
            //获取总数
            var totalpage          = tasksCount / YaeherOperListInfo.MaxResultCount;
            var YaeherOperListList = await query.PageBy(YaeherOperListInfo.SkipTotal, YaeherOperListInfo.MaxResultCount).ToListAsync();

            return(new PagedResultDto <YaeherOperList>(tasksCount, YaeherOperListList.MapTo <List <YaeherOperList> >()));
        }
示例#2
0
        public async Task <IList <YaeherOperList> > YaeherOperListList(YaeherOperListIn YaeherOperListInfo)
        {
            var YaeherOperLists = _repository.GetAll().OrderByDescending(a => a.CreatedOn).Where(YaeherOperListInfo.Expression);

            return(await YaeherOperLists.ToListAsync());
        }