public IActionResult Edit(int?id) { if (id == null) { return(NotFound()); } var course = CourseRepo.FindCourse((int)id); if (course == null) { return(NotFound()); } EditCourseVM name = new EditCourseVM { CourseId = course.Id, Name = course.Name, Description = course.Description, Teachers = TeacherRepo.GetAll(), }; return(View(name)); }
public IActionResult Index() { var teachers = teacherService.GetAll(); return(View(teachers)); }