public IActionResult GetAll() { ResponseDto <List <Restaurante> > response = new ResponseDto <List <Restaurante> >(); try { RestauranteBll bll = new RestauranteBll(_context); List <Restaurante> restaurantes = bll.GetAll(); response.Result = restaurantes; response.Status = StatusResponse.SUCCESS.Value; } catch (ListNoContentException ex) { response.Status = StatusResponse.ERROR.Value; response.Message = ex.Message; } catch (Exception ex) { response.Status = StatusResponse.ERROR.Value; response.Message = "Erro ao consultar todos os restaurantes: " + ex.Message; } return(new ObjectResult(response)); }