Beispiel #1
0
        public ActionResult AddOrUpdate(Entity.Page model)
        {
            _pageRepo.AddOrUpdate(model);
            var routeItem = new RouteItem(0, null, (string)ControllerContext.RequestContext.RouteData.Values["controller"],
                                          "Index",
                                          (int)ControllerContext.RequestContext.RouteData.Values["id"])
            {
                Type = Common.TypeEntityFromRouteEnum.PageType
            };

            _routeItemRepository.AddOrUpdate(routeItem);
            return(RedirectToAction("AdminIndex"));
        }