예제 #1
0
        public async Task <IActionResult> CadastrarVeiculo(VeiculoModel veiculoModel, CancellationToken ctx)
        {
            var result = await _veiculoApplication.CadastrarVeiculo(veiculoModel, ctx);

            if (result.Valid)
            {
                return(Created("/veiculos", result.Object));
            }

            return(UnprocessableEntity(result.Notifications));
        }