Table of Contents

Class Pagination<T>

Namespace
XENBIT.ResQueServe.Core.Models
Assembly
RQS.Core.dll

Represents pagination details for a collection of items and includes information about current page, total pages, page size, total items, and the items themselves.

public record Pagination<T> : IEquatable<Pagination<T>>

Type Parameters

T

The type of the items contained in the paginated collection.

Inheritance
Pagination<T>
Implements
Inherited Members

Properties

CurrentPage

Gets the number of the current page in the pagination sequence.

public required int CurrentPage { get; set; }

Property Value

int

Empty

Gets an empty pagination result with no items.

public static Pagination<T> Empty { get; }

Property Value

Pagination<T>

Items

Gets the collection of items on the current page.

public required IEnumerable<T> Items { get; set; }

Property Value

IEnumerable<T>

PageSize

Gets the number of items per page.

public required int PageSize { get; set; }

Property Value

int

TotalItems

Gets the total number of items across all pages.

public required int TotalItems { get; set; }

Property Value

int

TotalPages

Gets the total number of pages available.

public required int TotalPages { get; set; }

Property Value

int

Methods

GetReadOnly()

public IReadOnlyCollection<T> GetReadOnly()

Returns

IReadOnlyCollection<T>

ToString()

Returns a string representation of the pagination details.

public override string ToString()

Returns

string

A string in the format "Page {CurrentPage} of {TotalPages}".