Esempio n. 1
0
        public void TestAll()
        {
            ReferenceInfoFacade facade = new ReferenceInfoFacade(UnitOfWork);

            var result = facade.GetAttachedSubjects <SubjectInfoDto>(23, 17, 1, 10, 1, 1, new SubjectInfoConverter());

            if (result != null)
            {
            }


            result = facade.GetSubjectsByKeyword(22, 9, 1, 10, 1, new SubjectInfoConverter());

            //result = facade.GetSubjectsByTemplate(9, null, 1, 10, null, null, 1, new SubjectInfoConverter());

            //List<FolderInfoDto> list = facade.GetFolders(Core.FolderType.Content, new FolderInfoConverter());

            List <ReferenceBriefDto> result11 = facade.GetList <ReferenceBriefDto>(30, 1, 10, new ReferenceBriefConverter(2));

            if (result11 != null)
            {
            }

            List <ReferenceBriefDto> result113 = facade.GetList <ReferenceBriefDto>(12, 1, 10, new ReferenceBriefConverter());

            if (result113 != null)
            {
            }

            ReferenceInfoDto item = facade.GetReferenceInfo <ReferenceInfoDto>(3965, new ReferenceInfoConverter());

            if (item != null)
            {
            }
        }
Esempio n. 2
0
 public ReferenceInfoDto GetReference(string alias, object languageId)
 {
     using (IUnitOfWork uow = UnitOfWorkFactory.Instance.Start(DataStoreResolver.CMSDataStoreKey))
     {
         ReferenceInfoFacade facade = new ReferenceInfoFacade(uow);
         ReferenceInfoDto    detail = facade.GetReferenceInfo(alias, null, languageId, new ReferenceInfoConverter(languageId));
         return(detail);
     }
 }
Esempio n. 3
0
        public void GetReferenceInfoWithLanguage()
        {
            ReferenceInfoFacade facade = new ReferenceInfoFacade(UnitOfWork);
            ReferenceInfoDto    item   = facade.GetReferenceInfo <ReferenceInfoDto>(4, new ReferenceInfoConverter(2));

            if (item != null)
            {
            }
        }
Esempio n. 4
0
        public void SaveReferenceLanguageBasic()
        {
            ReferenceInfoFacade facade1 = new ReferenceInfoFacade(UnitOfWork);
            ReferenceInfoDto    item    = facade1.GetReferenceInfo <ReferenceInfoDto>(4, new ReferenceInfoConverter());

            ReferenceData data = new ReferenceData();

            data.Id          = 5;
            data.Title       = item.Title;
            data.Description = "chinese of UofT";
            data.Keywords    = "university, UofT";

            ReferenceFacade facade = new ReferenceFacade(UnitOfWork);
            IFacadeUpdateResult <ReferenceData> result = facade.SaveReferenceLanguageBasic(data, 2);

            if (result.IsSuccessful)
            {
            }
        }