Ejemplo n.º 1
0
        public ActionResult Create(SectionModel section)
        {
            if (GetValid(section))
            {
                IDBConnector db    = DBConnectorFactory.GetDBConnector();
                int          index = db.InsertSection(ConvertSectionModel(section));

                List <SectionLinkModel> links = MarkdownConverter.FindInternalLinks(section.Text, index);
                db.InsertSectionLinks(links);

                return(RedirectToAction(StringKeys.EDIT_FROM_ID, StringKeys.PAGE_CONTROLLER, new { pageID = section.PageID }));
            }

            return(View(section));
        }