随笔分类 -  Linq to SQL

Linq to SQL — Group by
摘要:需求是需要统计数据库中表某一列的总数量,同时以List的形式返回到UI层。Linq to SQL中的Group by用法如下:IList<Unit.HandleCountClass> result;result = (from a in db.handleinfo_users group a by a.han_Server into g select new HandleCountClass { type = g.Key, Handlecount... 阅读全文
posted @ 2013-01-16 16:28 guolebin7 阅读(1091) 评论(0) 推荐(0)