OData Tips and tricks
Dette indhold er ikke tilgængeligt i dit sprog endnu.
A collection of OData tips and tricks have been collected here, in no particular order or prioritization.
How to simulate the IN operator (SQL query)
Section titled “How to simulate the IN operator (SQL query)”The SQL query “WHERE some_field IN (‘value1, ‘value2’)” does not have an OData equivalent but the functionality can be simulated by using the OR operator.
In your code, insert the following command “var results = context.Files.Where(f => f.SomeField == “value1” || f.SomeField == “value2″);”
The code, when executed, will be translated into a valid OData request similar to: /OData/Files()?$filter=SomeField eq ‘value1’ or SomeField eq ‘value’

