Example #1
0
        public ActionResult Display(string slug)
        {
            try
            {
                var articlerec = (from c in db.tblNewsArticles where c.slug == slug select c).FirstOrDefault();

                ManageNewsViewModel MNVM = new ManageNewsViewModel(db);
                MNVM.BuildVM(articlerec.NewsArticleId);
                return View(MNVM.currentVM);
            }
            catch
            {
                return RedirectToAction("Error404", "Error");
            }
        }
Example #2
0
 public ActionResult Show(int articleid)
 {
     ManageNewsViewModel MNVM = new ManageNewsViewModel(db);
     MNVM.BuildVM(articleid);
     return View(MNVM.currentVM);
 }