public ActionResult RemoveStudentFromGroup(RemoveStudentFromGroup model) { //complete operation GroupService service = new GroupService(); service.RemoveUserFromGroup(db, model.StudentId); return RedirectToAction("Index","Group"); }
public ActionResult RemoveStudentFromGroup(int id) { Student student = db.Students.Find(id); if(student == null) { return HttpNotFound(); } RemoveStudentFromGroup model = new RemoveStudentFromGroup() { StudentId = id, Student = student }; return View(model); }