Efficient retrieval of lists over WebServices
- by Chris
I have a WCF WebService that uses LINQ and EF to connect to an SQL database. I have an ASP.NET MVC front end that collects its data from the webservice.
It currently has functions such as
List<Customer> GetCustomers();
As the number of customers increases massively the amount of data being passed increases also reducing efficiency. What is the best way to "page data" across WebServices etc.
My current idea is to implement a crude paging system such as
List<Customer> GetCustomers(int start, int length);
This, however, means I would have to replicate such code for all functions returning List types. It is unfortunate that I cannot use LINQ as it would be much nicer.
Does anyone have any advice or ideas of patterns to implement that would be "as nice as possible"
Thanks