I've been trying to solve this problem all day, and haven't found a solution that truly works. When I search for some data, I want to filter out the data based on multiple words.
My input value is split up by using the standard .Split-function.
string[] searchstrings = MessageResult.Split(' ');
I've made a query (which obviously doesn't work properly) that tries to filter out all the entries that matches every string in searchstrings.
var suggestions = (from a in query
from w in searchstrings
where a.Message.ToLower().Contains(w.ToLower())
select a).Distinct();
query is my variable which has all the data. How can I make this query to actually only match out entries that includes every string in searchstrings?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…