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)); }
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)); }