How to construct query with AND, OR?

Mar 7, 2011 at 2:19 PM

Are there any examples of how to construct queryies with and/or? The .OrWhere and .AndWhere operators don't seem to do what I want. 

I'd like to add/remove different conditions to my query depending on run-time conditions in my program. But I get stuck on how to add/remove the conditions (in contrast to modifying conditions, which is both easy and works well).


Martin Johansson

Mar 11, 2011 at 4:28 AM
Edited Mar 11, 2011 at 4:53 AM


Have you got an example of what you are trying to do and what doesn't work.
As long as there is an existing Where clause, AndWhere & OrWhere should (in theory) do what you want.