public async Task <IActionResult> Edit(int id, [Bind("Id,Quantity")] OrderShoes orderShoes) { if (id != orderShoes.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(orderShoes); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!OrderShoesExists(orderShoes.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(orderShoes)); }
public async Task <IActionResult> Create([Bind("Id,Quantity")] OrderShoes orderShoes) { if (ModelState.IsValid) { _context.Add(orderShoes); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(orderShoes)); }