// CREATE Primera parte (GET) public async Task <IActionResult> Create() { var menu = await _menuData.GetMenu(); CrearPedidoModel model = new CrearPedidoModel(); menu.ForEach(x => { model.ItemsMenu.Add(new SelectListItem { Value = x.Id.ToString(), Text = x.NombrePlato }); }); return(View(model)); }
public async Task <IActionResult> Index() { var menu = await _menuData.GetMenu(); return(View(menu)); }