I have a database table that contains entries for every SMS customers have sent. It looks something like this:
CustomerId SentBy SentTo SentDate
I want to create a report that lists the total amount of sent SMS messages per customer, using LINQ (preferably fluent syntax)
var smses = smsTable.GroupBy(x => x.CustomerId);
I'm not quite sure how to loop through the result, though. I want the following output:
CustomerId SmsCount
----------------------
1234 1756
100 333
I'd appreciate any help!