Files
DiunaBI/DiunaBI.Application/DTOModels/Common/PagedResult.cs

12 lines
414 B
C#
Raw Normal View History

2025-11-06 10:20:00 +01:00
namespace DiunaBI.Application.DTOModels.Common;
public class PagedResult<T>
{
public List<T> Items { get; set; } = new();
public int TotalCount { get; set; }
public int PageSize { get; set; }
public int Page { get; set; }
public int TotalPages => (int)Math.Ceiling(TotalCount / (double)PageSize);
public bool HasPreviousPage => Page > 1;
public bool HasNextPage => Page < TotalPages;
}