对于方法 String.Contains,只支持可在客户端上求值的参数。

var ProjectLevel_XJJS = "06,07,08,09";

p.Where(e =>ProjectLevel_XJJS.Contains(e.LevelCode)).Count()

以上代码报错:对于方法 String.Contains,只支持可在客户端上求值的参数。

===========修改=============

var ProjectLevel_XJJS = "06,07,08,09";

p.Where(e =>ProjectLevel_XJJS.Split(',').Contains(e.LevelCode)).Count()

原文地址:https://www.cnblogs.com/seacher/p/3727134.html