I am trying to implement a method where the keywords stored in the database for an activity (split by a comma) match the giving string split by a comma.
public List SearchByMultipleKeyword(string keywords)
{
string[] keywordsSeparated = keywords.Split(',');
var results = (from a in Entities.TblActivities
where keywordsSeparated.Any(keyword => a.Keywords.Contains(keyword))
select a).ToList();
return results;
}