linq groupby datarow 多字段 分组
DataTable aTable = new DataTable();
var result = aTable.Rows.Cast<DataRow>().GroupBy(x => x["ustomerid"].ToString() + x["productid"].ToString()).Where(x =>
{
var sum = x.Sum(y => Convert.ToInt32(y["sellNum"]));
return s..
转载
2021-11-10 10:43:45 ·
676 阅读 ·
0 评论