Pagination
On Server Side:
Once you have an IQueryable<T> which has your stored command it it (i.e. the where and ordey by clauses) use .Skip and .Take to get the pages.
Pass in:
Pass out:
On Client Side
Use PaginationModule from ngx-bootstrap. This will provide navigation around the pages.
When loading a new page, set only the TotalItems and TotalPages to prevent triggering a seconp page load.
Once you have an IQueryable<T> which has your stored command it it (i.e. the where and ordey by clauses) use .Skip and .Take to get the pages.
Pass in:
- pageNumber
- pageSize
Pass out:
- Items - so they can be displayed
- CurrentPage
- ItemsPerPage
- TotalItems - so this can be displayeded
- TotalPages - so this can provide other pages to load
On Client Side
Use PaginationModule from ngx-bootstrap. This will provide navigation around the pages.
When loading a new page, set only the TotalItems and TotalPages to prevent triggering a seconp page load.
Comments
Post a Comment