public async Task <ValidationResult> AddAsync(ClienteRegisterViewModel clienteViewModel) { var registerCommand = _mapper.Map <RegisterClienteCommand>(clienteViewModel); var command = await _mediator.SendCommand(registerCommand); return(command); }
public async Task <IActionResult> Add([FromBody] ClienteRegisterViewModel cliente) { var response = await _clienteAppService.AddAsync(cliente); return(Ok(response)); }