- var myvalue=
- from c in children
- group c by new
- {
- c.School,
- c.Friend,
- c.FavoriteColor,
- } into gcs
- select new ConsolidatedChild()
- {
- School = gcs.Key.School,
- Friend = gcs.Key.Friend,
- FavoriteColor = gcs.Key.FavoriteColor,
- Children = gcs.ToList(),
- };
Here you will see that how can you do group with multiple column in LINQ.
