IPagedList - 2 different sources

286 Views Asked by At

I have to implement Paging for keyword search results. The search may return Home results and community results. (This is for a real estate site). So there are 2 types to display. I need to implement paging for the results shown using IPagedList. I see that IPagedList have only one source? is it possible to have 2 sources and implement paging? Can some one give idea?

Thanks in advance.

2

There are 2 best solutions below

0
On

You can make two types implement a common interface and use IPagedList<ISharedInterface> as view model. If you can share what info you want to display from both types it would be more clear.

0
On

Creator of the PagedList library here.

You could always make it an IPagedList if you want to go with the nuclear option.