LINQ to Entities does not recognize the method 'System.Object get_Item(System.Object)' method, and this method cannot be translated into a store expression.
报这个错 是因为本表达式只是LINQ to Entities,而不是真正的C#语言,虽然上述代码在编译是没有错误,但运行时,转换为SQL就产生了错误,无法转换为存储表达式。
需要提前把变量转换好了: