public ActionResult Edit(int id) { var brepo = new BlogPostRepo(); var post = brepo.GetPageById(id); return View(post); }
//[Authorize(Roles = "Admin")] public ActionResult Show(int id) { var brepo = new BlogPostRepo(); var page = brepo.GetPageById(id); return View(page); }
public void CanGetPageById() { BlogPostRepo repo = new BlogPostRepo(); int testId = 2; var statePage = repo.GetPageById(testId); Assert.AreEqual(statePage.StaticPageID, testId); }