System.Linq.Dynamic

Try using simply "CityName.Contains(@1)" this will convert to the proper lambda since its a method invocation on an accessible type.

something like:

var query =
db.Customers. Where("CityName.Contains(@0) or CityName.Contains(@1)", "London", "USA")


http://www.albahari.com/nutshell/predicatebuilder.aspx

猜你喜欢

转载自www.cnblogs.com/zwei1121/p/9298171.html