Beispiel #1
0
        public async Task <IActionResult> AddNewMedicalRecordWithImage(
            [FromBody] AddNewMedicalRecordWithImageViewModel medicalRecordViewModel)
        {
            if (!ModelState.IsValid)
            {
                NotifyModelStateErrors();
                return(Response(medicalRecordViewModel));
            }

            _medicalRecordAppService.Add(medicalRecordViewModel);
            return(Response(medicalRecordViewModel));
        }
Beispiel #2
0
        public void Add(AddNewMedicalRecordWithImageViewModel medicalRecordViewModel)
        {
            var medicalReport = _mapper.Map <AddNewMedicalReportWithImageCommand>(medicalRecordViewModel);

            _bus.SendCommand(medicalReport);
        }