public IActionResult PostAdvanced([FromBody] TreatmentMachineViewModel treatmentMachineViewModel) { if (!ModelState.IsValid) { NotifyModelStateErrors(); return(Response(treatmentMachineViewModel)); } _treatmentMachineService.RegisterAdvanced(treatmentMachineViewModel); return(Response(treatmentMachineViewModel)); }
public void RegisterAdvanced(TreatmentMachineViewModel treatmentMachineViewModel) { var registerTreatmentMachineCommand = _mapper.Map <RegisterAdvancedTreatmentMachineCommand>(treatmentMachineViewModel); _mediator.SendCommand(registerTreatmentMachineCommand); }