LINQ to Entities 不识别方法“Double Sqrt(Double)”,因此该方法无法转换为储存

LINQ to Entities 不识别方法“Double Sqrt(Double)”,因此该方法无法转换为存储double x50var itemsfrom

LINQ to Entities 不识别方法“Double Sqrt(Double)”,因此该方法无法转换为存储


double x=50;
var items=from t in CityAction where Math.Sqrt(t.CoorX)<=x select t;


报错:LINQ to Entities 不识别方法“Double Sqrt(Double)”,因此该方法无法转换为存储.

Math.Sqrt(t.CoorX)这个地方求平方根的时候报错,有什么办法可以解决?
[解决办法]
double x=50;
var items=from t in CityAction.ToList() where Math.Sqrt(t.CoorX)<=x select t;

相关阅读 - 阅读人气排行