I have a textbox that takes free text as input for a search and I have a LINQ query that I want to extend with this type of search.
The input could be something like "big blue car" and that should result in a query that searches for titles that contain all these words.
There is also an option to switch to “any word” instead of “all words”.
What is the best/easiest way to add this to my LINQ query?
The query now looks like
from b in books
where b.InStore == true && b.Price > 10 && title.Contains()...at this point i want to add the text search.
select b
I strongly reccommend you to do it with two queries!
But take a look at this, isn’t it cool?
But you really should make it with two different queries.