I have a list of keywords in an ArrayList and I wanted to be able to build a query to find records in a table based on this keywords.
Since the list of keywords is d
This oughtta do it:
var query = table.Where(p => keywords.Any(kw => p.Name.StartsWith(kw)));
var query = table.Where(p => keywords.Any(kw => p.Name.StartsWith(keyword1) || p.Name.StartsWith(keyword2) || p.Name.StartsWith(keyword3) || p.Name.StartsWith(keyword4)));
Hope it can help you and have a nice day.