Esempio n. 1
0
        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);
        }
Esempio n. 2
0
        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);
        }