// GET: /Course/ public ActionResult Index() { string query = db.Courses.ToString(); object x; if (Caching.Configuration.Cache.GetItem("test_db" + query + "_", out x) == false) { sqldep dep = new sqldep(); dep.Initialization(query); } return(View(db.Courses)); }
// GET: /Student/ public ActionResult Index() { //System.Diagnostics.Debug.WriteLine(Caching.Configuration.Cache.Count); string query = db.Students.ToString(); object x; if (Caching.Configuration.Cache.GetItem("TEST_SAMO_" + query + "_", out x) == false) { sqldep dep = new sqldep(); dep.Initialization(query); } return(View(db.Students)); }