I want to use the paging in some scenario and I am looking for the best way to do it with cocktail.
DevForce currently offer 2 possibilities (using an EntityQueryPager or an EntityQueryPagedCollectionView) but I don't see how it is possible to use them with the different pattern present in Cocktail.
To be able to use the EntityQueryPager I need to access it from the VM. Having methods from the SearchRepository where the result would be a Query is I think an anti pattern.
For the EntityQueryPagedCollectionView I need to provide a query for its constructor. So it's again I can't use it in the viewmodel. Another possiblity could be to instantiate the Collection in the SearchRepository and return it from there but again I don't like it much.
If I can't use thoses 2 classes I can still create methods which could take as parameters the page index and page size and do myself the skip/take. So far looks like the best solution but is it really ?
To resume, can anyone indicate to me the best way to work with paging in Cocktail ?
Anotther question, does Devforce provide a similar functionnality as the TotalEntityCount of the WCF RIA DomainClientResult ?
I'd like to use the VirtualQueryableCollectionView of Telerik (the solution with the page index and page size looks like the best fit for it) and knowing the totalcount of the query dataset is needed to set the size of the collection. I would like to avoid the need of having a "Count" query for each search method in my repositories.