我想根据相同的值按 Solo 列分组,并通过 linq 计算其总数

I want to group by Solo column according to the same value and calculate its total by linq

我想根据相同的值对Solo列进行分组并计算其总和

不确定您的对象名称是什么,所以我将提供一个您应该能够为您的域翻译的通用示例。

var query = 
    from row in table
    group row by row.solo into grouped
    select new 
    { 
        Solo = grouped.Key,
        Total = grouped.Sum(g => g.ColumnToTotal)
    };