public ActionResult AddProductToCartFromSearch(int productId)
        {
            var guid = CookieHandler.GetUserId();
            var eventproducer = new CartEventsProducer(session);

            eventproducer.CartPutEventsInDb(guid, productId);

            return RedirectToAction("ShoppingCart");
        }
        public ActionResult AddManyProductsToCart(int id, int amount )
        {
            var guid = CookieHandler.GetUserId();

            var eventProducer = new CartEventsProducer(session);

            eventProducer.CartPutManyEventsInDb(guid, id, amount);

            return RedirectToAction("ShoppingCart");
        }
        public ActionResult RemoveRowFromCart(int productId, int amount)
        {
            var guid = CookieHandler.GetUserId();
            var eventproducer = new CartEventsProducer(session);

            eventproducer.RemoveRowFromCart(guid, productId, amount);

            return RedirectToAction("ShoppingCart");
        }
        public ActionResult ShoppingCart()
        {
            var id = CookieHandler.GetUserId();
            var cartEventsProducer = new CartEventsProducer(session);

            var list = cartEventsProducer.GetEventsFromDb(id);
            var dictionary = Cart.TakeEventsAndDoCalculations(list);
            return View(dictionary);
        }
        public ActionResult RemoveProductFromCart(int Id)
        {
            var guid = CookieHandler.GetUserId();
            var eventproducer = new CartEventsProducer(session);

            eventproducer.RemoveOneItemFromStock(guid, Id);
            return RedirectToAction("ShoppingCart");
        }