public ViewResult Index()
        {
            ViewBag.Title = "Basket";
            var items = _storeRep.getStoreitems();

            _storeRep.listStoreItems = items;

            var obj = new StoreProductViewModel
            {
                storeProduct = _storeRep
            };

            return(View(obj));
        }
        public IActionResult Checkout(Order order)
        {
            storeProduct.listStoreItems = storeProduct.getStoreitems();

            if (storeProduct.listStoreItems.Count == 0)
            {
                ModelState.AddModelError("", "0 items in the cart");
            }

            if (ModelState.IsValid)
            {
                allOrders.createOrder(order);
                return(RedirectToAction("Complete"));
            }

            return(View(order));
        }