c# - Query for string containing one or more of many strings -
i found example here:
var foo = things.where(data => mylist.contains(data.title));
however exact string matching. interested in if data.title.tolower() contains of strings found in list tolower().
say list has apple, book clock in it.
data.title example: apple jacks, book club, clockwork book, fine. claws , foods, clicks, application fundamentals, not accepted.
you want each item title
may contain (ignoring case):
var foo = things.where(data => mylist .any(item => data.title.tolower().contains(item.tolower())));
Comments
Post a Comment