public ActionResult Edit(int id) { Student student = stdManagementService.GetById(id); //courseservice.GetById(id); List <Course> selectedcourses = (List <Course>)student.Courses; List <Course> courses = courseservice.GetAll(); ViewBag.courses = new MultiSelectList(courses, "Id", "CourseName", selectedcourses.Select(x => x.Id).ToArray()); return(View(StudentVM.ToStudentVM(student))); }
public ActionResult Details(int id) { Student student = stdManagementService.GetById(id); //courseservice.GetById(id); return(View(StudentVM.ToStudentVM(student))); }