How to use .Contains and ToLower in Linq query in MongoDB?

本秂侑毒 提交于 2019-12-13 12:34: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])).

来源:https://stackoverflow.com/questions/53826723/how-to-use-contains-and-tolower-in-linq-query-in-mongodb

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!