public IActionResult AddCartItem(UserAddToCartViewModel postModel) { var dboCart = new CartDBO(); dboCart.Quantity = postModel.Quantity; dboCart.CartId = postModel.CartId; dboCart.ID = postModel.ID; dboCart.ProductID = postModel.ProductID; dboCart.PurseName = postModel.PurseName; dboCart.Price = postModel.Price; _CartRepository.InsertCartItem(dboCart); return(RedirectToAction(nameof(CartController.CartItems))); }
public IActionResult UserAddToCart() { var model = new UserAddToCartViewModel(); return(View(model)); }