求大神帮忙,将一条SQL转换成linq,涉及row_number
--------------------编程问答-------------------- try:var query=from t in (Table1.GroupBy(o=>o.PassMatchID)
.Select(g=>g.OrderByDescending(x=>x.speed)
.Select((o,i)=>new {o.FootID,o.Speed,o.Ullage,o.PassMatchID,o.LoftID,lev=i+1}
))
orderby t.PassMatchID descending
select new {o.FootID,o.Speed,o.Ullage,o.PassMatchID,o.LoftID,lev,
allnum=Table1.Where(one=>one.PassMatchID==t.PassMatchID).Select(one=>one.footid).Count()
};
补充:.NET技术 , ASP.NET