コード例 #1
0
        public async Task <PagedResult <Student> > GetPaged(BasePagedRequest request)
        {
            var testQueryable = testList.AsQueryable();

            var pagedRequest = request.GetPagedRequest(returnResultsOnly: true);

            var result = await testReFilterActions.GetPaged(testQueryable, pagedRequest);

            return(result);
        }
コード例 #2
0
ファイル: SchoolService.cs プロジェクト: Cubelaster/ReFilter
        public async Task <PagedResult <School> > GetPaged(BasePagedRequest request)
        {
            var testQueryable = testList.AsQueryable(); // Any kind of queryable

            var pagedRequest = request.GetPagedRequest(returnResults: true);

            var result = await testReFilterActions.GetPaged(testQueryable, pagedRequest);

            return(result);
        }
コード例 #3
0
ファイル: StudentService.cs プロジェクト: Cubelaster/ReFilter
        public async Task<PagedResult<StudentViewModel>> GetPagedMappedProjection<U>(BasePagedRequest request)
        {
            var testQueryable = testList.AsQueryable();

            List<StudentViewModel> mappingFunction(IQueryable<Student> x) => StudentMapper.MapIQueryableToViewModel(x);
            var pagedRequest = request.GetPagedRequest((Func<IQueryable<Student>, List<StudentViewModel>>)mappingFunction);

            var result = await testReFilterActions.GetPaged(testQueryable, pagedRequest);

            return result;
        }
コード例 #4
0
ファイル: SchoolService.cs プロジェクト: Cubelaster/ReFilter
        public async Task <PagedResult <CollegeViewModel> > GetCollegePagedSearchQuery <U>(BasePagedRequest request)
        {
            var testQueryable = SchoolMapper.MapListToCollege(testList).AsQueryable();

            List <CollegeViewModel> mappingFunction(List <College> x) => SchoolMapper.MapListToViewModel(x);

            var pagedRequest = request.GetPagedRequest((Func <List <College>, List <CollegeViewModel> >)mappingFunction);

            var result = await testReFilterActions.GetBySearchQuery(testQueryable, pagedRequest);

            return(result);
        }
コード例 #5
0
ファイル: SchoolService.cs プロジェクト: Cubelaster/ReFilter
        public async Task <PagedResult <SchoolViewModel> > GetPagedMapped <U>(BasePagedRequest request)
        {
            var testQueryable = testList.AsQueryable();

            List <SchoolViewModel> mappingFunction(List <School> x) => SchoolMapper.MapListToViewModel(x);

            var pagedRequest = request.GetPagedRequest((Func <List <School>, List <SchoolViewModel> >)mappingFunction);

            var result = await testReFilterActions.GetPaged(testQueryable, pagedRequest);

            return(result);
        }