Tolitech.CodeGenerator.Pagination
1.0.0-alpha-2
This is a prerelease version of Tolitech.CodeGenerator.Pagination.
The owner has unlisted this package.
This could mean that the package is deprecated, has security vulnerabilities or shouldn't be used anymore.
dotnet add package Tolitech.CodeGenerator.Pagination --version 1.0.0-alpha-2
NuGet\Install-Package Tolitech.CodeGenerator.Pagination -Version 1.0.0-alpha-2
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="Tolitech.CodeGenerator.Pagination" Version="1.0.0-alpha-2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Tolitech.CodeGenerator.Pagination" Version="1.0.0-alpha-2" />
<PackageReference Include="Tolitech.CodeGenerator.Pagination" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Tolitech.CodeGenerator.Pagination --version 1.0.0-alpha-2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Tolitech.CodeGenerator.Pagination, 1.0.0-alpha-2"
#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.
#:package Tolitech.CodeGenerator.Pagination@1.0.0-alpha-2
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Tolitech.CodeGenerator.Pagination&version=1.0.0-alpha-2&prerelease
#tool nuget:?package=Tolitech.CodeGenerator.Pagination&version=1.0.0-alpha-2&prerelease
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Tolitech.CodeGenerator.Pagination
Pagination library used in projects created by the Code Generator tool.
This project allows simplifying the use and return of paginated lists either by using an ORM as Entity Framework Core, or by simply using lists with LINQ.
Tolitech Code Generator Tool: http://www.tolitech.com.br
Examples:
public class Person
{
public Person(string name)
{
Name = name;
}
public string Name { get; private set; }
}
var people = new List<Person>();
for (int i = 0; i < 50; i++)
{
people.Add(new Person($"Person {i}"));
}
var items = people.Skip(0).Take(10).ToList();
var paginated = new PaginatedList<Person>(items, people.Count, 1, 10);
var paginated = new PaginatedList<Person>(people, 5, 10);
bool b1 = paginated.First().Name == "Person 40"); // this is true
bool b2 = paginated.Last().Name == "Person 49"); // this is true
var paginatedList = new PaginatedList<Person>(people, 5, 10);
var paginated = new Paginated<Person>(paginatedList, 5);
bool b1 = paginated.HasPreviousPage == true; // this is true
bool b2 = paginated.HasNextPage == false; // this is true
bool b3 = paginated.IsFirstPage == false; // this is true
bool b4 = paginated.IsLastPage == true; // this is true
bool b5 = paginated.FirstItemOnPage == 41; // this is true
bool b6 = paginated.LastItemOnPage == 50; // this is true
Other Usage Properties:
- HasPreviousPage
- HasNextPage
- IsFirstPage
- IsLastPage
Check the unit tests to learn about other exposed properties and various possibilities for use.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. 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. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net6.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 |
|---|
More information at http://www.tolitech.com.br/