How to create query expression for Odata for get by Id
问题 I have created an OData service and now I am trying to consume this service at client side. I wants to create an expression such as for the below url in the c# query expression- http://odata.org/Product-Service/Product(150) The above url is working fine in browsers but I want to create query expression in the C# for the above url. Any help would be greatly appreciable. 回答1: You could use a DataServiceContext + DataServiceQuery in System.Data.Services.Client to hit the Url. Remember no query