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

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

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