My question is about how you handle paging with a WCF data service. The way I want to use it, is execute a query (passing page size and current page), and get back the results of that query and also the paging information like total number of pages, current page number and page size. This paging information is used by the client (which is another service that transforms the result to JSON for a mobile application that consumes it) to handle next/previous buttons.
However, using LINQ on a WCF data service is too limited, it doesn't support the LINQ expression I need.
I tried creating a service operation in the WCF data service, but I can only return IQueryable collections of data entities, so I cannot return a custom entity that also contains paging information.
Is there a way to do implement paging for a WCF data service so that I next to the result I also get back paging information?
EDIT: because of the limitations of WCF data services, I switched to a normal WCF service. To be honest, I don't see why anyone would ever want to use a data service with these severe limitations!