public static IEnumerable <StudyEventDayItemViewModel> GetEducatorEventsDayViewModels( EducatorMasterPerson educatorMasterPerson, DateTime fromDate, DateTime toDate) { return(GetEducatorEvents(educatorMasterPerson, fromDate, toDate) .GroupBy(vm => vm.Start.Date) .OrderBy(g => g.Key) .Select(g => StudyEventDayItemViewModel.Build(g.Key, g.AsEnumerable()))); }
public static IEnumerable <StudyEventDayItemViewModel> GetStudyEventsDaysViewModelsForDateRange( StudentGroup studentGroup, StudyEventsTimeTableKind studyEventsTimeTableKind, DateTime fromDate, DateTime toDate) { return(GetStudyEventIndexViewModelsByDateRange(studentGroup, studyEventsTimeTableKind, fromDate, toDate) .GroupBy(vm => vm.Start.Date) .OrderBy(g => g.Key) .Select(g => StudyEventDayItemViewModel.Build(g.Key, g.AsEnumerable()))); }