Simple package to return paginated data
$ dotnet add package PagedPackageSimple package to return paginated data
The main objective of this package is to facilitate the return of paginated data, simply implementing the result of its data to the entity of the corresponding package.
Install-Package PagedPackage -Version 1.0.0
public async Task<PagedResult<Customers>> GetCustomersAsync(int pageNumber, int pageSize)
{
return await PagedResult<Customers>.ToPagedList(_context.Customers, pageNumber, pageSize);
}
##The Result Is


As you can see, it will return:
#PageNumber
#PageSize
#TotalRows
#TotalPages
#Items
#HasNextPage
#HasPreviousPage
See the example that is in the project for its implementation.