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 }); } } }
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); } } }
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); } } }