public DeletePatientDTO DeletePatient(int id, [FromBody] DeletePatientDTO patient) { Patient patientEntity = _repository.GetPatientById(id); patient.Id = patientEntity.Id; _mapper.Map(patient, patientEntity); _repository.DeletePatient(patientEntity); _repository.Save(); return(patient); }
public IActionResult DeletePatient(int id, [FromBody] DeletePatientDTO patient) { _patientService.DeletePatient(id, patient); return(NoContent()); }