public void Add(Entities.Page page)
        {
            var pageStore = new PageStore(Context.FileSystem);

            if (pageStore.FindAll(x => x.SiteId == Context.Site.Id && x.ParentId == page.ParentId && x.Url == page.Url).Any())
            {
                throw new Exception(string.Format("Page with url: {0} already exists.", page.Url));
            }

            //set the siteId of the current url
            page.SiteId = Context.Site.Id;

            pageStore.Add(page);
        }
Beispiel #2
0
        public void Add(Entities.Page page)
        {
            var pageStore = new PageStore(Context.FileSystem);
            if (pageStore.FindAll(x => x.SiteId == Context.Site.Id && x.ParentId == page.ParentId && x.Url == page.Url).Any())
            {
                throw new Exception(string.Format("Page with url: {0} already exists.", page.Url));
            }

            //set the siteId of the current url
            page.SiteId = Context.Site.Id;

            pageStore.Add(page);
        }