public IActionResult MarkShipped(int Id) { Order order = repository.Orders .FirstOrDefault(o => o.Id == Id); if (order != null) { order.Shipped = true; repository.SaveOrder(order); } return(RedirectToAction(nameof(List))); }
public IActionResult MarkShipped(int Id) { Order order = repository.Orders .FirstOrDefault(o => o.Id == Id); if (order != null) { order.Shipped = true; repository.SaveOrder(order); } return(RedirectToAction(nameof(List))); }