コード例 #1
0
        public IFacadeUpdateResult <FolderData> SaveSubsiteBatch(FolderTreeData folderTree, SubsiteData subSite)
        {
            UnitOfWork.BeginTransaction();
            // 1. Save parent folder
            folderTree.Folder.IsSubsiteRoot = true;
            FacadeUpdateResult <FolderData> result = SaveFolderTree(folderTree);

            if (result.IsSuccessful)
            {
                // 2. Save SubsiteData
                subSite.SubsiteFolderId = result.Result.Id;
                IFacadeUpdateResult <SubsiteData> subSiteResult = SubsiteSystem.SaveSubsite(subSite);
                result.ValidationResult.Merge(subSiteResult.ValidationResult);
                if (subSiteResult.IsSuccessful)
                {
                    UnitOfWork.CommitTransaction();
                }
                else
                {
                    UnitOfWork.RollbackTransaction();
                }
            }
            else
            {
                UnitOfWork.RollbackTransaction();
            }

            return(result);
        }
コード例 #2
0
 public SubsiteBatchFacade(IUnitOfWork unitOfWork)
     : base(unitOfWork)
 {
     FolderSystem       = new FolderSystem(unitOfWork);
     SubsiteSystem      = new SubsiteSystem(unitOfWork);
     ReferenceSystem    = new ReferenceSystem(unitOfWork);
     SubitemValueSystem = new SubitemValueSystem(UnitOfWork);
 }
コード例 #3
0
 public SubsiteFacade(IUnitOfWork unitOfWork)
     : base(unitOfWork)
 {
     SubsiteSystem = new SubsiteSystem(unitOfWork);
 }