首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > .NET >

请问怎么将SQL转换成LINQ语句,语句如下

2013-03-26 
请教如何将SQL转换成LINQ语句,语句如下select document,max(P1) as P1,max(P2) as P2 from table group by

请教如何将SQL转换成LINQ语句,语句如下
select document,max(P1) as P1,max(P2) as P2 from table group by document
[解决办法]
var source=from t in table group t by t.document into g select new{key=g.key,P1=g.Max(s=>s.P1),P2=g.Max(ss=>ss.P2)};

热点排行