I was wondering if there is an easy way to place two Lambda expressions in a single (Linq/Where) query?
For example, I currently call a method with something like the following:
string testing = "blablabla"; if(testing == "" || testing == null) I have tried a few combinations such as:
testing.Where(x => x == ("") || x=> x == null); But the above doesn't work. I know I can set up a method that returns a predicate/bool, but, at the moment, I am interested in Lambdas and was just wondering how to achieve this.
Do I need to chain multiple Where methods, or is there a way to achieve multiple Lambdas?
(p.s. I know about IsNullOrEmpty, this is just the first example I could think of!)
String.IsNullOrEmptynot work?