Beispiel #1
0
        public ActionResult EditClinic(AddEditClinicViewModel editClinic)
        {
            if (ModelState.IsValid)
            {
                var clinic  = Mapper.Map <AddEditClinicViewModel, Clinic>(editClinic);
                var updated = _clinicRepository.EditClinic(clinic);

                if (updated)
                {
                    return(RedirectToAction("Index"));
                }
            }

            return(View(editClinic));
        }