from x in db.tablename
let ccc = x.ccc
let ddd = f(ccc)
orderby ddd
select new
{
a = ccc,
b = ddd
};
报错 :方法“f()”不支持转换为 SQL
有啥办法解决吗?
要排序的字段是通过f() 方法返回的数字。。
------解决方案--------------------------------------------------------
from x in db.tablename
let ccc = x.ccc
let ddd = f(x.ccc)
orderby ddd
select new
{
a = ccc,
b = ddd
};