public void TestOneToMany() { string storeTypeName = "ST1"; StoreType st1 = new StoreType(); st1.Name = storeTypeName; Store s1 = new Store(); s1.Code = "S01"; s1.StoreType = st1; Store s2 = new Store(); s2.Code = "S02"; s2.StoreType = st1; UnitOfWork uow = new UnitOfWork(); uow.Save(st1); uow.Save(s1); uow.Save(s2); uow.Commit(); st1.Refresh(); Assert.IsNotNull(st1.Stores); Assert.AreEqual(2, st1.Stores.Count); }