LINQ to Entities: Why can't I use Split method as condition?

后端 未结 4 2085
失恋的感觉
失恋的感觉 2020-12-21 02:37

I have the following LINQ query:

var aKeyword = \"ACT\";
var results = from a in db.Activities
              where a.Keywords.Split(\',\').Contains(aKeyword)         


        
4条回答
  •  庸人自扰
    2020-12-21 02:40

    You may want to look at this question about L2E and .Contains for a solution that should be more efficient than guessing at a superset before filtering client side.

提交回复
热议问题