我试图在LINQ的字母来进行评估,但表达的不能在SQL编译。的LINQ表达式“(str1.CompareTo(STR2)<0)”无法翻译,将在当地
任何提示?
建议的答案不起作用。我得到:
The LINQ expression '(Compare([f].str1, str2, Ordinal) < 0)' could not be translated and will be evaluated locally.
更新:我正在使用http://www.albahari.com/nutshell/predicatebuilder.aspx
如果str是字符串只写(STR1
Seb
@Seb的PredicateBuilder:你如何期望甚至编译?没有'<(string,string)'操作符。 –
@Seb您不能测试对字符串 –