Inheritance: StudentCreateModel
        public ActionResult Edit(StudentEditModel model)
        {
            if (!ModelState.IsValid)
            {
                return RedirectToEditWithValidation(model);
            }

            var student = Context.Students.Find(model.Id);

            if (student == null)
            {
                return HttpNotFound();
            }

            student.Forenames = model.Forenames;
            student.LastName = model.LastName;
            student.EnrolmentDate = model.EnrolmentDate;

            Context.SaveChanges();
            var details = Mapper.Map<StudentDetailsModel>(student);

            return View("details", details);
        }
 private ActionResult RedirectToEditWithValidation(StudentEditModel model)
 {
     return View("edit", new StudentEditModel()
     {
         Id = model.Id,
         Forenames = model.Forenames,
         LastName = model.LastName,
         EnrolmentDate = model.EnrolmentDate.Value,
         ValidationRequired = model.ValidationRequired
     });
 }