Esempio n. 1
0
 public PageContent Get(Guid pageContentId)
 {
     try
     {
         var result = _pageContentRepository.Get(pageContentId);
         return(result);
     }
     catch (Exception ex)
     {
         _logger.LogError("Error occured while calling Get", ex);
     }
     return(null);
 }
Esempio n. 2
0
        private void DeleteModulesAndContent(PageLayout pageLayout)
        {
            //When page layout is being copied, all modules and contents should be deleted.
            var pageModules  = _pageRepository.GetPageModules(pageLayout.PageId);
            var pageContents = _pageContentRepository.Get(pageLayout.PageId, Globals.FallbackLanguage);

            if (pageModules != null && pageModules.Count > 0)
            {
                foreach (var pageModule in pageModules)
                {
                    pageModule.IsDeleted = true;
                    _pageRepository.UpdatePageModule(pageModule);
                }
            }

            if (pageContents != null && pageContents.Count > 0)
            {
                foreach (var content in pageContents)
                {
                    content.IsDeleted = true;
                    _pageContentRepository.Update(content);
                }
            }
        }
        public PageContent Get(Guid pageContentId)
        {
            var result = _pageContentRepository.Get(pageContentId);

            return(result);
        }