public ActionResult ListPopular(ImdbCache imdbcache, int page = 1) { cache = imdbcache; var repo = repoFactory.GetMostPopularTorrents(); return(PopulateModel(page, repo)); }
public ActionResult ListRecent(ImdbCache imdbcache, int page = 1) { cache = imdbcache; var repo = repoFactory.GetLatestUploadedTorrents(); return(PopulateModel(page, repo)); }
public object BindModel(ControllerContext controllerContext, ModelBindingContext bindingContext) { ImdbCache cache = null; if (controllerContext.HttpContext.Session != null) { cache = (ImdbCache)controllerContext.HttpContext.Session[sessionKey]; } if (cache == null) { cache = new ImdbCache(); if (controllerContext.HttpContext.Session != null) { controllerContext.HttpContext.Session[sessionKey] = cache; } } return(cache); }