public async Task <IActionResult> DeactivatePatient([FromBody] DeactivatePatientViewModel patientViewModel) { if (!ModelState.IsValid) { NotifyModelStateErrors(); return(Response(patientViewModel)); } _patientAppService.Deactivate(patientViewModel); return(Response(patientViewModel)); }
public void Deactivate(DeactivatePatientViewModel patientViewModel) { var registerCommand = _mapper.Map <DeactivatePatientCommand>(patientViewModel); _bus.SendCommand(registerCommand); }