Class PagedList<T>
- Namespace
- Biwen.QuickApi.UnitOfWork.Pagenation
- Assembly
- Biwen.QuickApi.dll
Represents the default implementation of the IPagedList<T> interface.
public class PagedList<T> : IPagedList<T>
Type Parameters
T
The type of the data to page
- Inheritance
-
PagedList<T>
- Implements
-
IPagedList<T>
- Inherited Members
- Extension Methods
Constructors
PagedList(IEnumerable<T>, int, int, int, int)
Creates an instance with predefined parameters.
public PagedList(IEnumerable<T> source, int pageIndex, int pageSize, int indexFrom, int count)
Parameters
source
IEnumerable<T>pageIndex
intpageSize
intindexFrom
intcount
int
Properties
HasNextPage
是否有下一页
public bool HasNextPage { get; }
Property Value
- bool
The has next page.
HasPreviousPage
是否有上一页
public bool HasPreviousPage { get; }
Property Value
- bool
The has previous page.
IndexFrom
获取索引开始值
public int IndexFrom { get; }
Property Value
- int
The index start value.
Items
获取当前页的数据 of T
public IList<T> Items { get; }
Property Value
- IList<T>
PageIndex
当前页码,从0开始
public int PageIndex { get; }
Property Value
PageSize
每页显示的数量
public int PageSize { get; }
Property Value
TotalCount
获取总数 of T
public int TotalCount { get; }
Property Value
TotalPages
获取总页数
public int TotalPages { get; }