Add project files
This commit is contained in:
11
T120B165-ImgBoard/Utils/PagedList.cs
Normal file
11
T120B165-ImgBoard/Utils/PagedList.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
namespace T120B165_ImgBoard.Utils;
|
||||
|
||||
public class PagedList<T>(List<T> items, int pageNumber, int pageSize, int totalCount)
|
||||
{
|
||||
public int CurrentPage { get; } = pageNumber;
|
||||
public int PageSize { get; } = pageSize;
|
||||
public int TotalCount { get; } = totalCount;
|
||||
public int TotalPages => (int) Math.Ceiling((double)TotalCount / PageSize);
|
||||
|
||||
public List<T> Items { get; } = items;
|
||||
}
|
||||
Reference in New Issue
Block a user