[Solved] C# LINQ queries within queries and selecting groups
The first method should use this method: https://msdn.microsoft.com/en-us/library/vstudio/bb549393(v=vs.100).aspx Something like: return students.GroupBy(student => student.Level, (level, students) => new Tuple(level, students.Count())); Sorry I’m unable to test this, but basically like your version I’m using a lambda to say Group all students by level. The second lambda tells the method what to do with those groups. In … Read more