Files
DotNetAngular/src/Application/DTOs/PagedResult.cs

12 lines
405 B
C#

namespace Application.DTOs;
public class PagedResult<T>
{
public List<T> Items { get; set; } = [];
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 HasPreviousPage => PageNumber > 1;
public bool HasNext => PageNumber < TotalPages;
}