group by 并且 count(1)的linq写法
SELECT [MobleNo],count(1)
FROM [CustMobleNo]
group by [MobleNo]
GO
===作用等于===
var rst = from c in dataContext.CustMobleNo
group c by c.MobleNo into g
select new
{
mobile=g.Key,
total=g.Count()
};
posted on 2017-02-16 15:34 Shine-Zhong 阅读(3544) 评论(0) 收藏 举报
浙公网安备 33010602011771号