PageResponse

Namespace: Commissiestrijd.Responses
Assembly: backend.dll

Represents a paginated response for a collection of items. This class is used to encapsulate a list of items along with pagination information, including the total number of pages based on the specified page size. The PageAmount property indicates how many pages of items are available, and the Items property contains the actual list of items for the current page.

public class PageResponse<T>

Type Parameters

T


Inheritance

objectPageResponse<T>


Constructors


PageResponse(List&lt;T&gt;, int)

Initializes a new instance of the PageResponse class. This constructor takes a list of items and a page size as parameters, and calculates the total number of pages based on the number of items and the specified page size.

public PageResponse(List<T> items, int pageAmount)

Parameters

NameType
itemsList
pageAmountint

Properties


Items

Gets the list of items for the current page.

public List<T> Items { get; }

Property Value

List&lt;T&gt;


PageAmount

Gets the total number of pages available for the current set of items.

public int PageAmount { get; }

Property Value

int