I want to send request like this:
/odata.svc/Pages(ItemId=27,PublicationId=1)
Here's the code I'm using:
CdService.ContentDeliveryService cdService = new ContentDeliveryService(new Uri("http://xxx.xx:81/odata.svc"));
var pages = cdService.Pages;
pages = pages.AddQueryOption("ItemId", "270");
pages = pages.AddQueryOption("PublicationId", "2");
var result = pages.Execute();
My problem is that this code is sending request like this:
/odata.svc/Pages()?ItemId=270&PublicationId=2
The problem with this request is that it returns me all the pages there are and not just the one I need.
I could use LINQ:
result.Single(page => page.ItemId == 27 && page.PublicationId == 1);
But the problem is that all the pages will still be sent over the wire