static public CreateMockInstance ( TransactionManager tm ) : TestIssue117Tableb | ||
tm | TransactionManager | |
Результат | Nettiers.AdventureWorks.Entities.TestIssue117Tableb |
///<summary> /// Returns a Typed TestIssue117Tablec Entity with mock values. ///</summary> static public TestIssue117Tablec CreateMockInstance_Generated(TransactionManager tm) { TestIssue117Tablec mock = new TestIssue117Tablec(); mock.DumbField = TestUtility.Instance.RandomBoolean(); //OneToOneRelationship TestIssue117Tablea mockTestIssue117TableaByTestIssue117TableAid = TestIssue117TableaTest.CreateMockInstance(tm); DataRepository.TestIssue117TableaProvider.Insert(tm, mockTestIssue117TableaByTestIssue117TableAid); mock.TestIssue117TableAid = mockTestIssue117TableaByTestIssue117TableAid.TestIssue117TableAid; //OneToOneRelationship TestIssue117Tableb mockTestIssue117TablebByTestIssue117TableBid = TestIssue117TablebTest.CreateMockInstance(tm); DataRepository.TestIssue117TablebProvider.Insert(tm, mockTestIssue117TablebByTestIssue117TableBid); mock.TestIssue117TableBid = mockTestIssue117TablebByTestIssue117TableBid.TestIssue117TableBid; // create a temporary collection and add the item to it TList <TestIssue117Tablec> tempMockCollection = new TList <TestIssue117Tablec>(); tempMockCollection.Add(mock); tempMockCollection.Remove(mock); return((TestIssue117Tablec)mock); }
///<summary> /// Update the Typed TestIssue117Tablec Entity with modified mock values. ///</summary> static public void UpdateMockInstance_Generated(TransactionManager tm, TestIssue117Tablec mock) { mock.DumbField = TestUtility.Instance.RandomBoolean(); //OneToOneRelationship TestIssue117Tablea mockTestIssue117TableaByTestIssue117TableAid = TestIssue117TableaTest.CreateMockInstance(tm); DataRepository.TestIssue117TableaProvider.Insert(tm, mockTestIssue117TableaByTestIssue117TableAid); mock.TestIssue117TableAid = mockTestIssue117TableaByTestIssue117TableAid.TestIssue117TableAid; //OneToOneRelationship TestIssue117Tableb mockTestIssue117TablebByTestIssue117TableBid = TestIssue117TablebTest.CreateMockInstance(tm); DataRepository.TestIssue117TablebProvider.Insert(tm, mockTestIssue117TablebByTestIssue117TableBid); mock.TestIssue117TableBid = mockTestIssue117TablebByTestIssue117TableBid.TestIssue117TableBid; }