This commit is contained in:
2025-05-10 17:48:45 +08:00
parent 4de9e6fcb4
commit 6d29816654
2 changed files with 11 additions and 0 deletions

View File

@@ -13,6 +13,9 @@
public record PagedList<T>(List<T> Items, int PageIndex, int PageSize, int TotalItems)
{
public bool HasNextPage => PageIndex * PageSize < TotalItems;
public int NextPage => PageIndex + 1;
public int PreviousPage => PageIndex - 1;
public bool HasPreviousPage => PageIndex > 1;
public int TotalPage => (int)Math.Ceiling((double)TotalItems / PageSize);