public static QueryResponseItemize CreateNew(int depth = 0)
        {
            rt.srz.model.srz.QueryResponseItemize entity = new rt.srz.model.srz.QueryResponseItemize();

            // You may need to maually enter this key if there is a constraint violation.
            entity.Id = System.Guid.NewGuid();


            using (rt.srz.business.manager.IQueryResponseManager queryResponseManager = ObjectFactory.GetInstance <IQueryResponseManager>())
            {
                var           all       = queryResponseManager.GetAll(1);
                QueryResponse entityRef = null;
                if (all.Count > 0)
                {
                    entityRef = all[0];
                }

                if (entityRef == null && depth < 3)
                {
                    depth++;
                    entityRef = QueryResponseTests.CreateNew(depth);
                    ObjectFactory.GetInstance <ISessionFactory>().GetCurrentSession().Save(entityRef);
                }

                entity.QueryResponse = entityRef;
            }

            using (rt.srz.business.manager.ISearchKeyTypeManager searchKeyTypeManager = ObjectFactory.GetInstance <ISearchKeyTypeManager>())
            {
                var           all       = searchKeyTypeManager.GetAll(1);
                SearchKeyType entityRef = null;
                if (all.Count > 0)
                {
                    entityRef = all[0];
                }

                if (entityRef == null && depth < 3)
                {
                    depth++;
                    entityRef = SearchKeyTypeTests.CreateNew(depth);
                    ObjectFactory.GetInstance <ISessionFactory>().GetCurrentSession().Save(entityRef);
                }

                entity.KeyType = entityRef;
            }

            return(entity);
        }
Esempio n. 2
0
        public static TwinsKey CreateNew(int depth = 0)
        {
            rt.srz.model.srz.TwinsKey entity = new rt.srz.model.srz.TwinsKey();

            // You may need to maually enter this key if there is a constraint violation.
            entity.Id = System.Guid.NewGuid();


            using (rt.srz.business.manager.ISearchKeyTypeManager searchKeyTypeManager = ObjectFactory.GetInstance <ISearchKeyTypeManager>())
            {
                entity.KeyType = null;
            }

            using (rt.srz.business.manager.ITwinManager twinManager = ObjectFactory.GetInstance <ITwinManager>())
            {
                entity.Twin = null;
            }

            return(entity);
        }
Esempio n. 3
0
        public static SearchKey CreateNew(int depth = 0)
        {
            rt.srz.model.srz.SearchKey entity = new rt.srz.model.srz.SearchKey();

            // You may need to maually enter this key if there is a constraint violation.
            entity.Id = System.Guid.NewGuid();

            entity.KeyValue = new System.Byte[] {};

            using (rt.srz.business.manager.IConceptManager conceptManager = ObjectFactory.GetInstance <IConceptManager>())
            {
                entity.DocumentUdlType = null;
            }

            using (rt.srz.business.manager.IInsuredPersonManager insuredPersonManager = ObjectFactory.GetInstance <IInsuredPersonManager>())
            {
                entity.InsuredPerson = null;
            }

            using (rt.srz.business.manager.IQueryResponseManager queryResponseManager = ObjectFactory.GetInstance <IQueryResponseManager>())
            {
                entity.QueryResponse = null;
            }

            using (rt.srz.business.manager.ISearchKeyTypeManager searchKeyTypeManager = ObjectFactory.GetInstance <ISearchKeyTypeManager>())
            {
                entity.KeyType = null;
            }

            using (rt.srz.business.manager.IStatementManager statementManager = ObjectFactory.GetInstance <IStatementManager>())
            {
                entity.Statement = null;
            }

            return(entity);
        }