The scenario is like this:
name | val
'aa' | 10
'bb' | 20
'cc' | 30
*********
sum | 60
For now I just select all the records in simple LINQ query and invoke the enumerator (ToList()
)
Then I loop over the list and summarize the val
column.
Is there a better way? LINQ selects all to a new typed object so I dont know how to add the additional data.
thanks.