Exemplo n.º 1
0
        public async Task <IActionResult> CreateVisit([FromBody] CreateVisitCommand command)
        {
            try
            {
                var result = await _mediator.Send(command);

                return(Ok(result));
            }
            catch (Exception e)
            {
                return(BadRequest(e.Message));
            }
        }
Exemplo n.º 2
0
 public async Task <IActionResult> CreateVisit([FromBody] CreateVisitCommand command)
 => Ok(await _mediator.Send(command));