public ActionResult CreateDoctor(DoctorModel doctor) { if (ModelState.IsValid) { _doctorRepository.AddDorctor(doctor); } else { return(View(doctor)); } return(RedirectToAction("DoctorsList")); }