【发布时间】:2013-02-07 08:35:50
【问题描述】:
where 表达式:
filtrationResult = filtrationResult.Where(string.Format("Convert.ToString({0}).Contains(@0)", filter.Field), filter.Value);
filter.Field 是名称列 (Int32)
我得到错误:
LINQ to Entities does not recognize the method 'System.String ToString(Int32)' method, and this method cannot be translated into a store expression.
如何正确转换?
【问题讨论】:
-
类似于对数字进行部分搜索?
标签: c# sql entity-framework