I cannot find a way to make this work and hoping someone has an idea. A simplified example would be having a list of say integers 1-100, i want to group every 3 rows so the
This example should work for querying non-numeric collections. It projects an index into the object to be grouped, and then removes it again during the grouping.
var studentQuery2 = students
.Select((student, index) => new {student, index})
.GroupBy(g => g.index / 3, i => i.student);