Esempio n. 1
0
        public IActionResult AddProductToOrder(CreateOrderDetailsViewModel model)
        {
            if (!ModelState.IsValid)
            {
                return(RedirectToRoute("defaultGetProduct", new { productId = model.ProductId }));
            }

            _basketManager.AddOrderDetails(model.ProductId, model.Quantity);

            return(RedirectToRoute("defaultGetBasket"));
        }