Example #1
0
        public ActionResult Create(string cartId)
        {
            CartAppService        cartAppService = new CartAppService();
            ProductCartAppService productCartApp = new ProductCartAppService();
            Cart cart = cartAppService.GetById(cartId);

            orderAppServices.InsertProductToOrder(cart);
            //cartAppService.Delete(cart.User_Id);
            foreach (var item in cart.ProductsCart)
            {
                productCartApp.DeleteProductCart(item.Id);
            }

            return(RedirectToAction("Index", "cart"));
        }
Example #2
0
 public ActionResult Delete(int ProductCart_Id)
 {
     productCartAppService.DeleteProductCart(ProductCart_Id);
     return(RedirectToAction("Index"));
 }