public async Task <IActionResult> Edit(int id, [Bind("TotalPrice,Status,StoreId,TimeOfOrder,Id")] Order order) { if (id != order.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(order); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!OrderExists(order.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(order)); }
public void Update(Product product) { _context.Update(product); }