Are there any built in paging functions for IEnumberable (or a better library to use)? I know there is Take<>(), but I find myself repeatedly implementing the basic calculations to determine # of pages for a given page size. I realize it’s simple implementation, but that’s why I’m hoping it’s already in the library and I just missed it.
By paging I mean a pointer to current record and something to fulfill the following concepts.
.PageSize <- get/set page size
.Last <- last page
.Current <- current page
.JumpTo(pageNumber)
With the fail safes to make sure you end up in the right place if page size or set size change
You can use the
PagedListwrapper around a List by Rob Conery. There is also an extended version by Troy Goode.