// GET: View
        public ActionResult View(int id)
        {
            StaticPage staticPage = db.StaticPages.Find(id);

            if (staticPage == null)
            {
                return(HttpNotFound());
            }

            return(View(StaticPageModel.FromEntity(staticPage)));
        }
Example #2
0
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            StaticPage staticPage = db.StaticPages.Find(id);

            if (staticPage == null)
            {
                return(HttpNotFound());
            }
            return(View(StaticPageModel.FromEntity(staticPage)));
        }
Example #3
0
 public ActionResult Index()
 {
     return(View(StaticPageModel.FromEntity(db.StaticPages.AsQueryable())));
 }