LINQ - How to sum row values in same group and create count column Linq query?

I have this query

from cs in summary
group cs by cs.groupId

but I can't add a select at the end. I'm trying to group by the group Id and have a column for sum of cs.count that have the same groupId. So the table would look like

csgroup1 sum1
csgroup2 sum2

and when you expand each group it'll show all the rows

#c-sharp #linq

7 Likes30.45 GEEK