12 lines
414 B
C#
12 lines
414 B
C#
|
|
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;
|
||
|
|
}
|