如何我在LINQ satament選擇列別名代碼的選擇條款,所以我可以對他們進行排序基本上我要完成在LINQ這個SQL語句:LINQ到SQL動態排序問題
select
type_id as id,
type_desc as description
from
dbo.equip_type_avt
order by
description
怎麼辦我更換了?????我的LINQ語句中的.Select子句中的?
public IQueryable<equip_type_avt> GetGridEquipmentTypes(string sidx, string sord)
{
try
{
return
ulsDB.equip_type_avts
.Select(?????)
.OrderBy(sidx + " " + sord);
}
catch (Exception ex)
{
string strErr = ex.Message;
return null;
}
}
謝謝。其實我想用我的功能作爲一個 – MikeD 2009-11-08 23:33:22