public ActionResult Index()
        {
            if (Session["products"] == null)
                Session["products"] = new SomeRepo().AllProducts().ToList();

            return View(Session["products"] as List<Product>);
        }
Exemple #2
0
        public ActionResult Index()
        {
            if (Session["products"] == null)
            {
                Session["products"] = new SomeRepo().AllProducts().ToList();
            }

            return(View(Session["products"] as List <Product>));
        }