Beispiel #1
0
        /// <summary>
        /// Gets paginated list of entities
        /// </summary>
        /// <param name="pageSize">Size of single page</param>
        /// <param name="pageNumber">Number of a page</param>
        /// <returns></returns>
        public async Task <PaginatedList <T> > GetPaginatedListAsync(int pageSize, int pageNumber)
        {
            var entities = _context.Set <T>() as IQueryable <T>;

            return(await PaginatedList <T> .GetPaginatedList(entities, pageSize, pageNumber));
        }