I want to enable this function in Linq to Entities (so the filtering happens on the SQL Server)?
public static bool ContainsAny(this string source, StringComparison comparison,
IEnumerable<string> searchTerms)
{
return searchTerms.Any(searchTerm => source.Contains(searchTerm, comparison));
}
My goal is search a table and limit the result by filtering a certain column with the above function, i.e. GetContacts().Where(c => c.FullName.ContainAny(searchTerm))
.