How to render an object tree with paging?
- by erikzeta
I’ll render an object graph on a page looking like this:
Category 1
Module 1
Product 1
Product 2
Product 3
Module 2
Product 4
Category 2
...
The Category has an IList<Module and the Module contains an IList<Product
Now I need to implement paging on this structure but the problem is that I can’t do Category.Skip(page * pageSize).Take(pageSize) because this will only work on the Category object not the whole object tree. In other words I like to render out when the sum of Categories, Modules and Products is equal to the PageSize
/erik