public async Task <ActionResult <PaginatedData <Sales> > > GetSales(int?pageSize, int?pageIndex) { int defaultPageIndex = 1; int defaultPageSize = 5; return(await PaginatedData <Sales> .CreateAsync(_context.Sales.AsNoTracking(), pageIndex ?? defaultPageIndex, pageSize ?? defaultPageSize));; }
public async Task <ActionResult <PaginatedData <Customer> > > GetCustomer(int?pageSize, int?pageIndex) { int defaultPageIndex = 1; int defaultPageSize = -1; return(await PaginatedData <Customer> .CreateAsync(_context.Customer.AsNoTracking(), pageIndex ?? defaultPageIndex, pageSize ?? defaultPageSize));; }
public async Task <ActionResult <PaginatedData <Product> > > GetProduct(int?pageSize, int?pageIndex) { int defaultPageIndex = 1; int defaultPageSize = -1; return(await PaginatedData <Product> .CreateAsync(_context.Product.AsNoTracking(), pageIndex ?? defaultPageIndex, pageSize ?? defaultPageSize));; }