public void SimpleObject1() { UInt64 id; TestRec tr; using (SessionNoServer session = new SessionNoServer(systemDir)) { session.BeginUpdate(); tr = new TestRec(55); session.Persist(tr, tr); id = tr.Id; session.Commit(); } using (SessionNoServer session = new SessionNoServer(systemDir)) { session.BeginRead(); TestRec tr2 = (TestRec)session.Open(id); int trInt = (int)tr.Stuff; int tr2Int = (int)tr2.Stuff; session.Commit(); } }
public void SimpleObject2() { UInt64 id; TestRec tr; using (SessionNoServer session = new SessionNoServer(systemDir)) { session.BeginUpdate(); tr = new TestRec("Arch"); session.Persist(tr, tr); id = tr.Id; session.Commit(); } using (SessionNoServer session = new SessionNoServer(systemDir)) { session.BeginRead(); TestRec tr2 = (TestRec)session.Open(id); string trString = (string)tr.Stuff; string tr2String = (string)tr2.Stuff; Assert.AreEqual(trString, tr2String); session.Commit(); } }
public void SimpleObject3() { UInt64 id; TestRec tr; using (SessionNoServer session = new SessionNoServer(systemDir)) { session.BeginUpdate(); int[] intArray = new Int32[] { 6, 7 }; tr = new TestRec(intArray); session.Persist(tr, tr); id = tr.Id; session.Commit(); } using (SessionNoServer session = new SessionNoServer(systemDir)) { session.BeginRead(); TestRec tr2 = session.Open <TestRec>(id); int[] trArray = (int[])tr.Stuff; int[] tr2Array = (int[])tr2.Stuff; Assert.AreEqual(trArray, tr2Array); session.Commit(); } }