public ActionResult ConfirmDeletion(int?id)
        {
            if (id == null)
            {
                return(RedirectToAction("NotFound", "Error"));
            }
            WhoWeAreService service = new WhoWeAreService(context);
            var             page    = service.getPage(id);

            if (page == null)
            {
                return(RedirectToAction("NotFound", "Error"));
            }
            var model = new ConfirmDeletionViewModel()
            {
                CreationDate = page.CreationDate,
                Id           = page.Id,
                Active       = page.Active,
                Controller   = this.GetType().Name.Replace("Controller", ""),
                CustomValue  = page.Id.ToString(),
                Title        = "Eliminar página de quiénes somos"
            };

            return(View(model));
        }
        public ActionResult PreviewPageById(int?id)
        {
            WhoWeAreService service = new WhoWeAreService(context);
            var             page    = service.getPage(id);

            if (page != null)
            {
                return(View("Preview", page));
            }
            return(RedirectToAction("NotFound", "Error"));
        }
        public ActionResult Edit(int?id)
        {
            /*if(id == null)
             * {
             *   return View(new WhoWeArePage() {
             *       HeadImages = new List<BenavidesFarm.DataModels.Models.Pages.Sections.WhoWeAreTitledSection>()
             *       {
             *           new BenavidesFarm.DataModels.Models.Pages.Sections.WhoWeAreTitledSection()
             *           {
             *               Title = "La singandinga",
             *               ImageFileName = "~/Content/rsc/imgs/doctors-office-recipe.png"
             *           },
             *           new BenavidesFarm.DataModels.Models.Pages.Sections.WhoWeAreTitledSection()
             *           {
             *               Title = "La singandinga",
             *               ImageFileName = "~/Content/rsc/imgs/doctors-office-recipe.png"
             *           }
             *       },
             *       WhoWeAreSection = new BenavidesFarm.DataModels.Models.Pages.Sections.WhoWeAreSimpleRowItem()
             *       {
             *           Title = "QS",
             *       },
             *       MisionSection = new BenavidesFarm.DataModels.Models.Pages.Sections.WhoWeAreSimpleRowItem()
             *       {
             *           Title = "Mision",
             *       },
             *       VisionSection = new BenavidesFarm.DataModels.Models.Pages.Sections.WhoWeAreSimpleRowItem()
             *       {
             *           Title = "Vision",
             *       },
             *       ValuesSection = new List<BenavidesFarm.DataModels.Models.Pages.Sections.WhoWeAreTitledSection>()
             *       {
             *           new BenavidesFarm.DataModels.Models.Pages.Sections.WhoWeAreTitledSection()
             *           {
             *               Title = "perra",
             *               ImageFileName = "~/Content/rsc/imgs/doctors-office-recipe.png"
             *           },
             *           new BenavidesFarm.DataModels.Models.Pages.Sections.WhoWeAreTitledSection()
             *           {
             *               Title = "perra",
             *               ImageFileName = "~/Content/rsc/imgs/doctors-office-recipe.png"
             *           }
             *       },
             *
             *       HistoryImages = new List<BenavidesFarm.DataModels.Models.Pages.Sections.WhoWeAreTitledSection>()
             *       {
             *           new BenavidesFarm.DataModels.Models.Pages.Sections.WhoWeAreTitledSection()
             *           {
             *               Title = "perra",
             *               ImageFileName = "~/Content/rsc/imgs/doctors-office-recipe.png"
             *           }
             *       },
             *       AdSection = new BenavidesFarm.DataModels.Models.Pages.Sections.WhoWeAreSimpleRowItemWithImage()
             *       {
             *           Title = "raca raca Ad",
             *           ImageFileName = "~/Content/rsc/imgs/doctors-office-recipe.png"
             *       }
             *  });
             * }*/

            var service = new WhoWeAreService(context);
            var model   = service.getPage(id);


            if (model == null)
            {
                return(RedirectToAction("NotFound", "Error"));
            }
            return(View(model));
        }