How to use .Contains and ToLower in Linq query in

2019-05-29 02:22发布

问题:

MongoDB C# Linq

How to use .contains and ToLower in Linq query?

 List<string> emailAddress = criteriaEmailAddress.ToLower().Split(',').ToList();
 return new Specification<UserProfiles>(r => emailAddress.Contains(r.EmailAddress.ToLower()));

Exception

Unsupported filter: Contains(value(System.Collections.Generic.List`1[System.String])).