public void TestQueriesAndInsert() { using (var context = TestDwhDbContext.CreateDWHDbContext()) { var hubRepo = new HubRepository <H_TestHub_Stores>(context, HashFunctions.MD5, null); var satelliteRepo = new SatelliteRepository <S_TestSatellite_Stores>(context, HashFunctions.MD5); var linkRepo = new LinkRepository <L_TestLink_Stores>(context, HashFunctions.MD5, null, DVKeyCaching.Disabled); var loadDate = DateTime.Now; // HUB - storing info hubRepo.Insert(TestHub1, loadDate, loadInformation: LoadInfo1); var hub = hubRepo.GetByKey(TestHub1.PrimaryKey); Assert.Equal(LoadInfo1.RecordSource, hub.RecordSource); Assert.Equal(LoadInfo1.LoadedBy, hub.LoadedBy); // SATELLITE - storing info Hub1Satellite1 = satelliteRepo.Insert(Hub1Satellite1, loadDate, loadInformation: LoadInfo1); var sat = satelliteRepo.GetCurrent(s => s.Reference == TestHub1.PrimaryKey).Single(); Assert.Equal(LoadInfo1.RecordSource, sat.RecordSource); Assert.Equal(LoadInfo1.LoadedBy, sat.LoadedBy); // LINK - storing info Link1 = linkRepo.Insert(Link1, loadDate, loadInformation: LoadInfo1); var link = linkRepo.GetByKey(Link1.PrimaryKey); Assert.Equal(LoadInfo1.RecordSource, link.RecordSource); Assert.Equal(LoadInfo1.LoadedBy, link.LoadedBy); } }