public IActionResult PostAdvanced([FromBody] TreatmentMachineViewModel treatmentMachineViewModel)
        {
            if (!ModelState.IsValid)
            {
                NotifyModelStateErrors();
                return(Response(treatmentMachineViewModel));
            }

            _treatmentMachineService.RegisterAdvanced(treatmentMachineViewModel);

            return(Response(treatmentMachineViewModel));
        }
Esempio n. 2
0
        public void RegisterAdvanced(TreatmentMachineViewModel treatmentMachineViewModel)
        {
            var registerTreatmentMachineCommand = _mapper.Map <RegisterAdvancedTreatmentMachineCommand>(treatmentMachineViewModel);

            _mediator.SendCommand(registerTreatmentMachineCommand);
        }