public ActionResult Update(int id) { string newName = Request.Form["newname"]; Student thisStudent = Student.Find(id); thisStudent.UpdateName(newName); return(RedirectToAction("StudentIndex")); }
public ActionResult Update(int id) { string newName = Request.Form["newname"]; Student thisStudent = Student.Find(id); thisStudent.UpdateName(newName); return(RedirectToAction("StudentIndex")); }