This question already has an answer here:
- C# Linq Grouping 2 answers
- C# Linq Group By on multiple columns 3 answers