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")); }
public void Initial() { productCartAppService = new ProductCartAppService(); }