private async Task LoadSubjectDataList() { SubjectDataService subjectDataService = new SubjectDataService(new EntityFramework.TimetableManagerDbContext()); SubjectList = await subjectDataService.GetSubjectsAsync(); SubjectList.ForEach(e => { SubjectDataList.Add(e); }); }
private async Task LoadSubjectData() { SubjectDataService subjectDataService = new SubjectDataService(new EntityFramework.TimetableManagerDbContext()); SubjectList = await subjectDataService.GetSubjectsAsync(); SubjectList.ForEach(f => { int sum = f.LectureHours + f.EvaluationHours + f.TutorialHours + f.LabHours; SubStatList.Add(new SubStatGrid { module = f.SubjectName, count = sum }); }); }