public IActionResult Delete(int doctorId) { _doctorManager.DeleteDoctor(new DoctorDTO { Id = doctorId }); var doctorDtos = _doctorManager.GetAllDoctors(null); var doctorViewModels = _vMMapper.Map(doctorDtos); return(RedirectToAction("Index")); }
public IActionResult Delete(int doctorId) { _DoctorManager.DeleteDoctor(new DoctorDto { Id = doctorId }); var doctorDtos = _DoctorManager.GetAllDoctors(null); var doctorViewModel = _ViewModelMapper.Map(doctorDtos); return(View("Index", doctorViewModel)); }