コード例 #1
0
 // GET: Article
 public ActionResult Full(int id)
 {
     using (var articleContext = new ArticleContext())
     {
         var article = articleContext.GetArticle(id);
         return View(article);
     }
 }
コード例 #2
0
 public ActionResult Index()
 {
     using (var articleContext = new ArticleContext())
     {
         var viewModel = new LandingPageViewModel
         {
             TopArticles = articleContext.GetTopArticles(),
             OtherArticles = articleContext.GetOtherArticles()
         };
         return View(viewModel);
     }
 }
コード例 #3
0
 public SearchHub()
 {
     _articleContext = new ArticleContext();
 }
コード例 #4
0
 public ArticleHub()
 {
     _articleContext = new ArticleContext();
 }