initial commit
This commit is contained in:
18
CityInfo.API/Services/PaginationMetadata.cs
Normal file
18
CityInfo.API/Services/PaginationMetadata.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
namespace CityInfo.API.Services
|
||||
{
|
||||
public class PaginationMetadata
|
||||
{
|
||||
public int TotalItemCount { get; set; }
|
||||
public int TotalPageCount { get; set; }
|
||||
public int PageSize { get; set; }
|
||||
public int CurrentPage { get; set; }
|
||||
|
||||
public PaginationMetadata(int totalItemCount, int pageSize, int currentPage)
|
||||
{
|
||||
TotalItemCount = totalItemCount;
|
||||
PageSize = pageSize;
|
||||
CurrentPage = currentPage;
|
||||
TotalPageCount = (int)Math.Ceiling(totalItemCount / (double)pageSize);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user