Please review my brief example code below and tell me if there is better, tighter way to write the LINQ query. The parent class is simply a student's name and a list of test score data. The child class is a single test score datum. I want to find the worst (or best) score out of all of the TestScore values and then identify the student who had the best score.
Thanks!
Dim query = From s In studentList _
Where s.ScoreList.Select(Function(d) d.TestScore).Min _
= studentList.SelectMany(Function(g) g.ScoreList).Select(Function(h) h.TestScore).Min _
Select StudentName = s.Student, _
WorstScore = s.ScoreList.Select(Function(g) g.TestScore).Min