Expose IQueryable Over WCF Service

You should check WCF Data Services which will allow you to define Linq query on the client. WCF Data Services are probably the only solution for your requirement.

IQueryable is still only interface and the functionality depends on the type implementing the interface. You can’t directly expose Linq-To-Sql or Linq-To-Entities queries. There are multiple reasons like short living contexts or serialization which will execute the query so the client will get list of all objects instead of the query.

Leave a Comment