public async Task <ActionResult> ListTeacher(int scienseId) { ViewBag.science = await _scienseService.GetScienseByIdAsync(scienseId); ViewBag.listTeacher = await _teacherService.GetTeacherByScienseIdAsync(scienseId); return(View()); }
public async Task <ActionResult> ProfileTeacher(int id) { var teacher = await _teacherService.GetTeacherByIdAysnc(id); var science = await _scienseService.GetScienseByIdAsync(teacher.SicenceID); var activityListByTeacher = await _teacherActitvityService.GetActivityByTeacherId(id); ViewBag.teacher = teacher; ViewBag.science = science; ViewBag.ActivityList = activityListByTeacher; ViewBag.ActivityId = activityListByTeacher.Select(a => a.ActivityId).FirstOrDefault(); return(View()); }