public List <Lanche> Get() { Lanche lanche = new Lanche(); List <Lanche> lanchesList = lanche.getAllLanches(); //return new string[] { "value1", "value2" }; return(lanchesList); }
public IActionResult GetMenu() { try { Menu menu = new Menu(); Lanche lanche = new Lanche(); Ingrediente ingrediente = new Ingrediente(); menu.Lanches = lanche.getAllLanches(); menu.Ingredientes = ingrediente.getAllIngredientes(); return(Ok(menu)); } catch (Exception) { return(BadRequest()); } }