Exemplo n.º 1
0
 public IActionResult CheckOut(Order order)
 {
     shopCart.listShopItems = shopCart.GetShopItems();
     if (shopCart.listShopItems.Count == 0)
     {
         ModelState.AddModelError("", "You must have items");
     }
     if (ModelState.IsValid)
     {
         orders.CreaateOrder(order);
         return(RedirectToAction("Complete"));
     }
     return(View(order));
 }