예제 #1
0
 public SubsiteInfoDto GetSubsiteInfo(object instanceId)
 {
     using (IUnitOfWork uow = UnitOfWorkFactory.Instance.Start(DataStoreResolver.CMSDataStoreKey))
     {
         SubsiteFacade  facade = new SubsiteFacade(uow);
         SubsiteInfoDto result = facade.GetSubsiteInfo(instanceId, new SubsiteInfoConverter());
         return(result);
     }
 }
예제 #2
0
 public IFacadeUpdateResult <SubsiteData> SaveSubsite(SubsiteInfoDto instance)
 {
     using (IUnitOfWork uow = UnitOfWorkFactory.Instance.Start(DataStoreResolver.CMSDataStoreKey))
     {
         SubsiteFacade facade = new SubsiteFacade(uow);
         IFacadeUpdateResult <SubsiteData> result = facade.SaveSubsite(SubsiteInfoConverter.ConvertToData(instance));
         return(result);
     }
 }
예제 #3
0
 public IEnumerable <SubsiteBriefDto> GetSubsites(bool isPublished = false)
 {
     using (IUnitOfWork uow = UnitOfWorkFactory.Instance.Start(DataStoreResolver.CMSDataStoreKey))
     {
         SubsiteFacade          facade = new SubsiteFacade(uow);
         List <SubsiteBriefDto> result = facade.GetSubsites(new SubsiteBriefConverter(), isPublished);
         return(result);
     }
 }
예제 #4
0
        public void TestAll()
        {
            SubsiteFacade  facade = new SubsiteFacade(UnitOfWork);
            SubsiteInfoDto item   = facade.GetSubsiteInfo <SubsiteInfoDto>(8, new SubsiteInfoConverter());

            if (item != null)
            {
            }

            List <SubsiteBriefDto> result = facade.GetSubsites <SubsiteBriefDto>(new SubsiteBriefConverter());

            if (result != null)
            {
            }
        }