示例#1
0
        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);
        }
示例#2
0
 public IActionResult DeletePatient(int id, [FromBody] DeletePatientDTO patient)
 {
     _patientService.DeletePatient(id, patient);
     return(NoContent());
 }