コード例 #1
0
        public async Task <PagedList <TEntity> > GetAsync(int pageNumber = 1, int pageSize = int.MaxValue, CancellationToken cancellationToken = default(CancellationToken))
        {
            var result = dbSet;

            return(await PageingHelper.CreatePagedListAsync <TEntity>(result, pageNumber, pageSize, cancellationToken));
        }
コード例 #2
0
        public async Task <PagedList <TEntity> > GetByConditionAsync(Expression <Func <TEntity, bool> > query, int pageNumber = 1, int pageSize = int.MaxValue, CancellationToken cancellationToken = default(CancellationToken))
        {
            var result = dbSet.Where(query);

            return(await PageingHelper.CreatePagedListAsync <TEntity>(result, pageNumber, pageSize, cancellationToken));
        }