public ActionResult New()
        {
            var page = new Page();

            var mapper = new PageToPageEditModelMapper(this.session);
            var pageEditModel = mapper.Map(page);

            return this.View("Edit", pageEditModel);
        }
        public ActionResult Fetch(PageDashboardQueryModel queryModel)
        {
            var mapper = new PageToPageEditModelMapper(this.session);

            var pages = this.session.Query<Page>()
                .Skip((queryModel.PageNumber - 1) * queryModel.PageSize)
                .Take(queryModel.PageSize)
                .ToList();

            pages.Insert(0, Page.HomePage);

            var pageEditModels = pages
                .Select(mapper.Map);

            return this.Json(pageEditModels, JsonRequestBehavior.AllowGet);
        }
        public ActionResult Edit(string pageId)
        {
            pageId = pageId.EnsurePrefix(Page.IdPrefix);

            var page = this.session.Load<Page>(pageId);
            if(page == null)
            {
                this.ModelState.AddModelError("No Such Page", "There was no page found matching the id.");

                return this.View(new PageEditModel());
            }

            var mapper = new PageToPageEditModelMapper(this.session);
            var pageEditModel = mapper.Map(page);

            return this.View(pageEditModel);
        }