OnPage 7.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package OnPage --version 7.0.0
NuGet\Install-Package OnPage -Version 7.0.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="OnPage" Version="7.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add OnPage --version 7.0.0
#r "nuget: OnPage, 7.0.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install OnPage as a Cake Addin
#addin nuget:?package=OnPage&version=7.0.0

// Install OnPage as a Cake Tool
#tool nuget:?package=OnPage&version=7.0.0

OnPage package

Using .NET CLI (Command Line)

To download OnPage, you can click here: Nuget

Introduction

Pagination is a common technique used to divide large datasets into smaller, manageable parts known as "pages." This allows for more efficient data retrieval and presentation, especially when dealing with large collections of data. In this NuGet project, we will implement pagination methods to help developers paginate their data effectively.

Methods

Page(index, size)

This method allows you to retrieve a specific page of data from the dataset based on the provided index and size parameters.

Parameters:

  • index (int): The index of the page to retrieve. Page indexing starts from 1.
  • size (int): The number of items to display per page.

Example:

// Assuming you have a list of items named 'dataList'
int pageIndex = 2;
int pageSize = 10;

var pageItems = dataList.Page(pageIndex, pageSize);
// 'pageItems' will contain the items for the second page with 10 items per page.

FirstPage(size)

This method allows you to retrieve a first page of data from the dataset based on the provided size parameters.

Parameters:

  • size (int): The number of items to display per page.

Example:

// Assuming you have a list of items named 'dataList'
int pageSize = 10;

var pageItems = dataList.FirstPage(pageSize);
// 'pageItems' will contain the items for the first page with 10 items per page.

LastPage(size)

This method allows you to retrieve a last page of data from the dataset based on the provided size parameters.

Parameters:

  • size (int): The number of items to display per page.

Example:

// Assuming you have a list of items named 'dataList'
int pageSize = 10;

var pageItems = dataList.LastPage(pageSize);
// 'pageItems' will contain the items for the first page with 10 items per page.

CountOfPage(size)

This method allows you to retrieve a count of pages of data from the dataset based on the provided size parameters.

Parameters:

  • size (int): The number of items to display per page.

Example:

// Assuming you have a list of items named 'dataList'
int pageSize = 10;

var pageCount = dataList.CountOfPages(pageSize);
// 'pageCount' will contain the count of pages of dataList
Product Compatible and additional computed target framework versions.
.NET net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net7.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
7.0.0.1 581 8/20/2023
7.0.0 740 7/24/2023
6.0.0 208 7/24/2023
1.0.0 154 7/24/2023