Пример #1
0
        public ActionResult CartTotal(ShoppingCart cart)
        {
            if(cart == null)
                cart = new ShoppingCart();

            return PartialView("CartTotal", cart);
        }
Пример #2
0
 private ShoppingCart GetCurrentCart()
 {
     var cart = (ShoppingCart)Session["cart"];
     if(cart == null)
     {
         Session["cart"] = cart = new ShoppingCart();
     }
     return cart;
 }