我正在使用 Linq to dataset 查询数据表。如果我想在数据表上执行按 "Column1" 分组的操作,我可以使用以下查询:
var groupQuery = from table in MyTable.AsEnumerable()
group table by table["Column1"] into groupedTable
select new
{
x = groupedTable.Key,
y = groupedTable.Count()
}
现在我想对“Coulmn1”和“Column2”这两列进行分组。请问有人能告诉我在数据表上执行多重分组的语法或提供一个链接来解释吗?
谢谢。