Search Results for

    Show / Hide Table of Contents
    View Source

    Class PagedResult

    Represents a paged result for a model collection

    Inheritance
    object
    Namespace: Umbraco.Cms.Core.Models
    Assembly: Umbraco.Core.dll
    Syntax
    [Obsolete("Superseded by PagedModel for service layer and below OR PagedViewModel in apis. Expected to be removed when skip/take pattern has been fully implemented v14+")]
    [DataContract(Name = "pagedCollection", Namespace = "")]
    public abstract class PagedResult

    Constructors

    View Source

    PagedResult(long, long, long)

    Initializes a new instance of the PagedResult class.

    Declaration
    public PagedResult(long totalItems, long pageNumber, long pageSize)
    Parameters
    Type Name Description
    long totalItems

    The total number of items.

    long pageNumber

    The current page number (1-based).

    long pageSize

    The number of items per page.

    Properties

    View Source

    PageNumber

    Gets the current page number (1-based).

    Declaration
    [DataMember(Name = "pageNumber")]
    public long PageNumber { get; }
    Property Value
    Type Description
    long
    View Source

    PageSize

    Gets the number of items per page.

    Declaration
    [DataMember(Name = "pageSize")]
    public long PageSize { get; }
    Property Value
    Type Description
    long
    View Source

    TotalItems

    Gets the total number of items across all pages.

    Declaration
    [DataMember(Name = "totalItems")]
    public long TotalItems { get; }
    Property Value
    Type Description
    long
    View Source

    TotalPages

    Gets the total number of pages.

    Declaration
    [DataMember(Name = "totalPages")]
    public long TotalPages { get; }
    Property Value
    Type Description
    long

    Methods

    View Source

    GetSkipSize()

    Calculates the skip size based on the paged parameters specified

    Declaration
    public int GetSkipSize()
    Returns
    Type Description
    int
    Remarks

    Returns 0 if the page number or page size is zero

    • View Source
    In this article
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX