LINQ to SQL语句(6)之Group By/Having

Group By/Having操作符 适用场景:分组数据,为我们查找数据缩小范围。 说明:分配并返回对传入参数进行分组操作后的可枚举对象。分组;延迟 1.简单形式: var q = from p in db.Products group p by p.CategoryID into g select g; 语句描述:使用Group By按CategoryID划分产品。 说明
相关文章
相关标签/搜索