public Doctor ConvertToSource(DoctorEditModel model)
        {
            var doctor = model.Id != 0 ? _unitOfWork.GetRepository<Doctor>().FindById(model.Id)
                                       : new Doctor();

            doctor = ModelConverterHelper.CopyObjectProperties(model, doctor);
            doctor.PersonDetails = _profileModelConverter.ConvertToSource(model.Profile);
            return doctor;
        }
        public ActionResult CreateDoctor(DoctorEditModel editModel)
        {
            if (ModelState.IsValid)
            {
                _doctorViewRepository.Insert(editModel);
                return RedirectToAction("DoctorsList");
            }

            return View(editModel);
        }