Beispiel #1
0
        public async Task <QueryResult <File> > GetAll(UserParams userParams)
        {
            var query = _files.AsQueryable();

            var result = await PagedList <File> .ApplyPaging(query, userParams.PageNumber, userParams.PageSize);

            return(result);
        }
Beispiel #2
0
        public async Task <QueryResult <File> > GetBySubCategoryId(Guid Id, UserParams userParams)
        {
            var query = _files.
                        Where(s => s.SubCategoryId == Id).AsQueryable();

            var result = await PagedList <File> .ApplyPaging(query, userParams.PageNumber, userParams.PageSize);

            return(result);
        }
Beispiel #3
0
        public async Task <QueryResult <SubCategory> > GetAll(UserParams userParams)
        {
            var query = _context.SubCategories
                        .Include(s => s.Notes)
                        .Include(s => s.Todos).AsQueryable();

            var result = await PagedList <SubCategory> .ApplyPaging(query, userParams.PageNumber, userParams.PageSize);

            return(result);
        }
Beispiel #4
0
        public async Task <QueryResult <Category> > GetAll(UserParams userParams)
        {
            var query = _categories
                        .Include(c => c.SubCategories)
                        .AsQueryable();
            var categories = _categories.Include(c => c.SubCategories);

            var result = await PagedList <Category> .ApplyPaging(query, userParams.PageNumber, userParams.PageSize);

            return(result);
        }
Beispiel #5
0
        public async Task <QueryResult <SubCategory> > GetByCategoryId(Guid Id, UserParams userParams)
        {
            var query = _subCategories.
                        Where(s => s.CategoryId == Id)
                        .Include(s => s.Notes)
                        .Include(s => s.Todos).AsQueryable();

            var result = await PagedList <SubCategory> .ApplyPaging(query, userParams.PageNumber, userParams.PageSize);

            return(result);
        }