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