コード例 #1
0
        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))));
        }
コード例 #2
0
 public IActionResult AddDiagnosis([FromBody] Diagnosis model)
 {
     dia_repo.Add(model);
     return(new OkObjectResult(new { DiagnosisID = model.DiagnosisId }));
 }