I am working with OData and .NET DataServiceQuery class. I have an instance where I want to query OData service for multiple entities based on ID (ID in 1,2,3)). However, OData needs this as a ID = 1 or ID = 2 or ID = 3 format, which is fine. But on the client side, I don't know how many IDs I will need ahead of time, so I need to be able to translate the following:
List ids = .... query.Where(x => ids.Contains(x.ID)
I am already familiar with creating my own IQueryable and I'm doing that and translating other portions of the LINQ expression. I'm just not sure how to translate the Contains lambda into the OR lambda, evaluating the incoming list to generate the conditions.