Exemplo n.º 1
0
        public async Task <IActionResult> DeactivatePatient([FromBody] DeactivatePatientViewModel patientViewModel)
        {
            if (!ModelState.IsValid)
            {
                NotifyModelStateErrors();
                return(Response(patientViewModel));
            }

            _patientAppService.Deactivate(patientViewModel);

            return(Response(patientViewModel));
        }
Exemplo n.º 2
0
        public void Deactivate(DeactivatePatientViewModel patientViewModel)
        {
            var registerCommand = _mapper.Map <DeactivatePatientCommand>(patientViewModel);

            _bus.SendCommand(registerCommand);
        }