public async Task <ActionResult <List <VeiculoDto> > > Get() { try { var veiculos = await veiculoService.GetAll(GetIdUsuarioLogado()).ToListAsync(); var veiculosDto = mapper.MapList <Veiculo, VeiculoDto>(veiculos); return(Ok(veiculosDto)); } catch (Exception ex) { return(BadRequest(new ErrorResponse(ex.Message))); } }
public IActionResult GetAll() { var result = service.GetAll(); return(Ok(result)); }