private void EnsureRootFoldersExist(string[] ids)
        {
            var dynamicContentService = _container.Resolve <IDynamicContentService>();

            foreach (var id in ids)
            {
                var rootFolder = dynamicContentService.GetFoldersByIds(new[] { id }).FirstOrDefault();
                if (rootFolder == null)
                {
                    rootFolder = new Domain.Marketing.Model.DynamicContentFolder
                    {
                        Id   = id,
                        Name = id
                    };
                    dynamicContentService.SaveFolders(new[] { rootFolder });
                }
            }
        }
Exemple #2
0
        private void EnsureRootFoldersExist(string[] ids)
        {
            var dynamicContentService = _container.Resolve <IDynamicContentService>();

            foreach (var id in ids)
            {
                var rootFolder = dynamicContentService.GetFolderById(id);
                if (rootFolder == null)
                {
                    rootFolder = new Domain.Marketing.Model.DynamicContentFolder
                    {
                        Id   = id,
                        Name = id
                    };
                    dynamicContentService.CreateFolder(rootFolder);
                }
            }
        }
Exemple #3
0
        private void EnsureRootFoldersExist(string[] ids)
        {
            var dynamicContentService = _container.Resolve<IDynamicContentService>();
            foreach (var id in ids)
            {
                var rootFolder = dynamicContentService.GetFolderById(id);
                if (rootFolder == null)
                {
                    rootFolder = new Domain.Marketing.Model.DynamicContentFolder
                    {
                        Id = id,
                        Name = id
                    };
                    dynamicContentService.CreateFolder(rootFolder);
                }
            }

        }