PageRequest
Namespace: SlottyMedia.Database.Pagination
This class represents a request for a IPage<T>. It specifies the page's size and the current page number. The page is then intended to be fetched server-side using this object.
public class PageRequest
Inheritance Object → PageRequest
Fields
PageNumber
The number of the page to request
public int PageNumber;
PageSize
Each page's size
public int PageSize;
Methods
Of(Int32, Int32)
Builds a request consisting of the page's number and size.
public static PageRequest Of(int pageNumber, int pageSize)
Parameters
pageNumber Int32
The page's number
pageSize Int32
The page's size
Returns
PageRequest
The corresponding request
OfSize(Int32)
Builds a request consisting of the page's size.
public static PageRequest OfSize(int pageSize)
Parameters
pageSize Int32
The page's size
Returns
PageRequest
The corresponding request
First()
Build a request equivalent to the first page.
public PageRequest First()
Returns
PageRequest
The corresponding request
Next()
Build a request equivalent to the next page.
public PageRequest Next()
Returns
PageRequest
The corresponding request
Previous()
Build a request equivalent to the previous page. Returns this object instead if there is no previous page.
public PageRequest Previous()
Returns
PageRequest
The corresponding request