PagedList.NetCore
1.0.1
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package PagedList.NetCore --version 1.0.1
NuGet\Install-Package PagedList.NetCore -Version 1.0.1
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="PagedList.NetCore" Version="1.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add PagedList.NetCore --version 1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: PagedList.NetCore, 1.0.1"
#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 PagedList.NetCore as a Cake Addin #addin nuget:?package=PagedList.NetCore&version=1.0.1 // Install PagedList.NetCore as a Cake Tool #tool nuget:?package=PagedList.NetCore&version=1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
See more in https://github.com/thiagobarradas/pagedlist-netcore
Paged list for .NET applications
Utilization with basic navigation
Create new pagination object
string originUrl = "http://www.myapp.com/list?filterA=xyz&filterB=123=123&pageSize=10&pageNumber=5";
int itemCount = 347;
int pageSize = 10;
int pageNumber = 5;
PagedList pagedList = new PagedList(originUrl, itemCount, pageNumber, pageSize);
Object structure
{
"options" : {
"pageNumber" : 5,
"pageSize" : 10,
"itemCount" : 347,
"pageCount" : 35
},
"navigator" : {
"navigatorSize" : null,
"first" : {
"url" : "http://www.myapp.com/list?filterA=xyz&filterB=123=123&pageSize=10&pageNumber=1",
"number" : 1
},
"previous" : {
"url" : "http://www.myapp.com/list?filterA=xyz&filterB=123=123&pageSize=10&pageNumber=4",
"number" : 4
},
"next" : {
"url" : "http://www.myapp.com/list?filterA=xyz&filterB=123=123&pageSize=10&pageNumber=6",
"number" : 6
},
"last" : {
"url" : "http://www.myapp.com/list?filterA=xyz&filterB=123=123&pageSize=10&pageNumber=35",
"number" : 35
},
"numerics" : null
}
}
Utilization with basic and numeric navigation
Create new pagination object
string originUrl = "http://www.myapp.com/list?filterA=xyz&filterB=123=123&pageSize=10&pageNumber=5";
int itemCount = 347;
int pageSize = 10;
int pageNumber = 5;
int navigatorSize = 10;
PagedList pagedList = new PagedList(originUrl, itemCount, pageNumber, pageSize, navigatorSize);
Object structure
{
"options":{
"pageNumber":5,
"pageSize":10,
"itemCount":347,
"pageCount":35
},
"navigator":{
"navigatorSize":10,
"first":{
"url":"http://www.myapp.com/list?filterA=xyz&filterB=123=123&pageSize=10&pageNumber=1",
"number":1
},
"previous":{
"url":"http://www.myapp.com/list?filterA=xyz&filterB=123=123&pageSize=10&pageNumber=4",
"number":4
},
"next":{
"url":"http://www.myapp.com/list?filterA=xyz&filterB=123=123&pageSize=10&pageNumber=6",
"number":6
},
"last":{
"url":"http://www.myapp.com/list?filterA=xyz&filterB=123&pageSize=10&pageNumber=35",
"number":35
},
"numerics":[
{
"url":"http://www.myapp.com/list?filterA=xyz&filterB=123&pageSize=10&pageNumber=1",
"number":1
},
{
"url":"http://www.myapp.com/list?filterA=xyz&filterB=123&pageSize=10&pageNumber=2",
"number":2
},
{
"url":"http://www.myapp.com/list?filterA=xyz&filterB=123&pageSize=10&pageNumber=3",
"number":3
},
{
"url":"http://www.myapp.com/list?filterA=xyz&filterB=123&pageSize=10&pageNumber=4",
"number":4
},
{
"url":"http://www.myapp.com/list?filterA=xyz&filterB=123&pageSize=10&pageNumber=5",
"number":5
},
{
"url":"http://www.myapp.com/list?filterA=xyz&filterB=123&pageSize=10&pageNumber=6",
"number":6
},
{
"url":"http://www.myapp.com/list?filterA=xyz&filterB=123&pageSize=10&pageNumber=7",
"number":7
},
{
"url":"http://www.myapp.com/list?filterA=xyz&filterB=123&pageSize=10&pageNumber=8",
"number":8
},
{
"url":"http://www.myapp.com/list?filterA=xyz&filterB=123&pageSize=10&pageNumber=9",
"number":9
},
{
"url":"http://www.myapp.com/list?filterA=xyz&filterB=123&pageSize=10&pageNumber=10",
"number":10
}
]
}
}
Some response samples
For this examples, the numeric navigator is defined as 3.
Current page is the first
{
"options":{
"pageNumber":1,
"pageSize":10,
"itemCount":347,
"pageCount":35
},
"navigator":{
"navigatorSize":3,
"first":null,
"previous":null,
"next":{
"url":"http://www.myapp.com/list?filterA=xyz&filterB=123&pageSize=10&pageNumber=2",
"number":2
},
"last":{
"url":"http://www.myapp.com/list?filterA=xyz&filterB=123&pageSize=10&pageNumber=35",
"number":35
},
"numerics":[
{
"url":"http://www.myapp.com/list?filterA=xyz&filterB=123&pageSize=10&pageNumber=1",
"number":1
},
{
"url":"http://www.myapp.com/list?filterA=xyz&filterB=123&pageSize=10&pageNumber=2",
"number":2
},
{
"url":"http://www.myapp.com/list?filterA=xyz&filterB=123&pageSize=10&pageNumber=3",
"number":3
}
]
}
}
Current page is the last
{
"options":{
"pageNumber":35,
"pageSize":10,
"itemCount":347,
"pageCount":35
},
"navigator":{
"navigatorSize":3,
"first":{
"url":"http://www.myapp.com/list?filterA=xyz&filterB=123&pageSize=10&pageNumber=1",
"number":1
},
"previous":{
"url":"http://www.myapp.com/list?filterA=xyz&filterB=123&pageSize=10&pageNumber=34",
"number":34
},
"next":null,
"last":null,
"numerics":[
{
"url":"http://www.myapp.com/list?filterA=xyz&filterB=123&pageSize=10&pageNumber=33",
"number":33
},
{
"url":"http://www.myapp.com/list?filterA=xyz&filterB=123&pageSize=10&pageNumber=34",
"number":34
},
{
"url":"http://www.myapp.com/list?filterA=xyz&filterB=123&pageSize=10&pageNumber=35",
"number":35
}
]
}
}
One item to show - Single page
{
"options":{
"pageNumber":1,
"pageSize":10,
"itemCount":10,
"pageCount":1
},
"navigator":{
"navigatorSize":3,
"first":null,
"previous":null,
"next":null,
"last":null,
"numerics":[
{
"url":"http://www.myapp.com/list?filterA=xyz&filterB=123&pageSize=10&pageNumber=1",
"number":1
}
]
}
}
Zero items to show
{
"options":{
"pageNumber":1,
"pageSize":10,
"itemCount":0,
"pageCount":0
},
"navigator":{
"navigatorSize":3,
"first":null,
"previous":null,
"next":null,
"last":null,
"numerics":null
}
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. 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. |
.NET Core | netcoreapp2.0 is compatible. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETCoreApp 2.0
- No dependencies.
NuGet packages (3)
Showing the top 3 NuGet packages that depend on PagedList.NetCore:
Package | Downloads |
---|---|
AspNetScaffolding3
AspNet Scaffolding with log, serializer, and all structure to work good for me :D |
|
Nancy.Scaffolding
Nancy Scaffolding with log, serializer, all structure to work good for me :D |
|
AspNetScaffolding
AspNet Scaffolding with log, serializer, and all structure to work good for me :D |
GitHub repositories
This package is not used by any popular GitHub repositories.