DataTable dt = dataSet.Tables[0];
var query = from t in dt.AsEnumerable()
group t by new { t1 = t.Field<string>("username"), t2 = t.Field<string>("department"), t3 = t.Field<string>("sex") } into m
select new
{
username = m.Key.t1,
department = m.Key.t2,
sex = m.Key.t3
};
DataTabe使用Linq实现 Group
最新推荐文章于 2022-08-01 10:44:52 发布