public void AllParams() { ISession s = OpenSession(); ITransaction tx = s.BeginTransaction(); Radio radio = new Radio(); radio.Frequency = "32 MHz"; s.Persist(radio); Assert.AreEqual(1, radio.Id); radio = new Radio(); radio.Frequency = "32 MHz"; s.Persist(radio); Assert.AreEqual(2, radio.Id); tx.Commit(); s.Close(); s = OpenSession(); tx = s.BeginTransaction(); s.Delete("from Radio"); tx.Commit(); s.Close(); }
public void AllParams() { ISession s = OpenSession(); ITransaction tx = s.BeginTransaction(); Radio radio = new Radio(); radio.Frequency="32 MHz"; s.Persist(radio); Assert.AreEqual(1, radio.Id); radio = new Radio(); radio.Frequency="32 MHz"; s.Persist(radio); Assert.AreEqual(2, radio.Id); tx.Commit(); s.Close(); s = OpenSession(); tx = s.BeginTransaction(); s.Delete("from Radio"); tx.Commit(); s.Close(); }