public async Task <IActionResult> Post(DiagnosisForAddDTO model) { Diagnosis diagnosis = mapper.Map <Diagnosis>(model); await diagnosisRepository.Add(diagnosis).ConfigureAwait(true); await unitOfWork.CompleteAsync().ConfigureAwait(true); return(Ok(mapper.Map <DiagnosisForGetDTO>(await diagnosisRepository.Get(diagnosis.Id).ConfigureAwait(true)))); }
public IActionResult AddDiagnosis([FromBody] Diagnosis model) { dia_repo.Add(model); return(new OkObjectResult(new { DiagnosisID = model.DiagnosisId })); }