예제 #1
0
        public void TestGetArchivedIem()
        {
            ItemSetUp();

            Assert.IsNotNull(DomainRepository <T> .GetArchived(ArchivedItem.ObjectId));

            Assert.IsNull(DomainRepository <T> .GetArchived(ActiveItem.ObjectId));
            Assert.IsNull(DomainRepository <T> .GetArchived(ActiveDeletedItem.ObjectId));
            Assert.IsNull(DomainRepository <T> .GetArchived(ArchivedDeletedItem.ObjectId));
            Assert.IsNull(DomainRepository <T> .GetArchived(DraftDeletedItem.ObjectId));
            Assert.IsNull(DomainRepository <T> .GetArchived(DraftItem.ObjectId));
        }
예제 #2
0
        public void TestGetArchivedIemAfterUnDelete()
        {
            ItemSetUp();

            With.Transaction(delegate
            {
                DomainRepository <T> .UnDelete(ArchivedDeletedItem);
            });

            Assert.IsNotNull(DomainRepository <T> .GetArchived(ArchivedDeletedItem.ObjectId));
            Assert.IsNotNull(DomainRepository <T> .Get(ArchivedDeletedItem.ObjectId));
        }
예제 #3
0
        public virtual T GetArchived(int id)
        {
            try
            {
                Authorize(Can_Read);
                return(DomainRepository <T> .GetArchived(id));
            }
            catch (System.Exception ex)
            {
                bool reThrow = ExceptionHandler.HandleBusinessLogicLayerException(ex);

                if (reThrow)
                {
                    throw;
                }

                return(null);
            }
        }