public IActionResult DeleteDoctor(int id) { var succeeded = _service.DeleteDoctor(id); if (succeeded) { return(Ok("Doctor deleted!")); } else { return(BadRequest("Bad request! Probably it's the id!")); } }
public async Task <IActionResult> DeleteDoctor(int doctorId) { await _doctorsService.DeleteDoctor(new DeleteDoctorCommand { DoctorId = doctorId }); return(NoContent()); }