public async Task <IActionResult> Create([Bind("IdCity,NameCity")] City city) { if (ModelState.IsValid) { _context.Add(city); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(city)); }
public async Task <IActionResult> Create([Bind("IdMenu,NameDose,Description,Price,ImageUri,Categorya")] Menu menu) { if (ModelState.IsValid) { _context.Add(menu); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(menu)); }
public async Task <IActionResult> Create([Bind("IdOrder,IdClub,IdMenu,DateForDay,Count")] Order order) { if (ModelState.IsValid) { _context.Add(order); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } ViewData["IdMenu"] = new SelectList(_context.Menu, "IdMenu", "IdMenu", order.IdMenu); return(View(order)); }