示例#1
0
 //отсортировать недели по наименьшей загруженности
 private IEnumerable <WeekInfo> GetSortedWeeksByCountLessons(ScheduleWeeks shedule)
 {
     return((from day in shedule.Days
             group day by day.Week into grp
             select new WeekInfo(grp.Key, grp.Sum(d => d.CountLessons))).OrderBy(day => day.CountLessons));
 }