The easiest way to do what you want is most likely to use a collection of "allowed" words and Contains:
HashSet<string> words = new HashSet<string> { "firm", "service", "training" };
var query = from controller in foo.Controllers
where words.Contains(controller)
select controller;
Or you can just use:
controller == "firm" || controller == "service" || controller == "training"
in the request.
If this does not help, please give us more context - you gave us only one compilation expression, and not a clear idea of what the query is or what it should do (and whether it is true in LINQ to Objects, LINQ to SQL or what something else).
source
share