示例#1
0
        private static void ProcessReferenceData(
            ReferenceDataContract referenceData)
        {
            if (referenceData != null)
            {
                IReferenceDataRepository repository =
                    ReferenceDataRepositoryFactory.GetReferenceDataRepository();

                if (referenceData.Disciplines != null)
                {
                    repository.Add(referenceData.Disciplines);
                }
                if (referenceData.ItemStatuses != null)
                {
                    repository.Add(referenceData.ItemStatuses);
                }
                if (referenceData.Sectors != null)
                {
                    repository.Add(referenceData.Sectors);
                }
                if (referenceData.Segments != null)
                {
                    repository.Add(referenceData.Segments);
                }
                if (referenceData.SpecSections != null)
                {
                    repository.Add(referenceData.SpecSections);
                }
            }
        }
示例#2
0
        public void GetReferenceDataRepositoryTest()
        {
            IReferenceDataRepository repository = ReferenceDataRepositoryFactory.GetReferenceDataRepository();

            Assert.AreNotEqual(null, repository);
            Assert.AreEqual("SqlCeReferenceDataRepository", repository.GetType().Name);
            this.testContextInstance.WriteLine("Created an IReferenceDataRepository of type {0}", repository.GetType().FullName);
        }