コード例 #1
0
        public IActionResult AddToCart()
        {
            var item = new ShoppingItem(DataBaseTools.GetSpecifiedProduct(2), 1);

            Models.ShoppingCart.addToShoppingCart(item, this.HttpContext);

            return(Redirect("Index"));
        }
コード例 #2
0
 // GET: /<controller>/
 public IActionResult View(int id)
 {
     return(View(DataBaseTools.GetSpecifiedProduct(id)));
 }