// GET: Article public ActionResult Full(int id) { using (var articleContext = new ArticleContext()) { var article = articleContext.GetArticle(id); return View(article); } }
public ActionResult Index() { using (var articleContext = new ArticleContext()) { var viewModel = new LandingPageViewModel { TopArticles = articleContext.GetTopArticles(), OtherArticles = articleContext.GetOtherArticles() }; return View(viewModel); } }
public SearchHub() { _articleContext = new ArticleContext(); }
public ArticleHub() { _articleContext = new ArticleContext(); }