littleshop/LittleShop/DTOs/PagedResultDto.cs
2025-08-27 18:02:39 +01:00

12 lines
403 B
C#

namespace LittleShop.DTOs;
public class PagedResult<T>
{
public List<T> Items { get; set; } = new();
public int TotalCount { get; set; }
public int PageNumber { get; set; }
public int PageSize { get; set; }
public int TotalPages => (int)Math.Ceiling((double)TotalCount / PageSize);
public bool HasPrevious => PageNumber > 1;
public bool HasNext => PageNumber < TotalPages;
}