Esempio n. 1
0
        protected override void OnSetUp()
        {
            using (var session = OpenSession())
            {
                using (var tran = session.BeginTransaction())
                {
                    var animal0 = new Animal();
                    var animal1 = new Reptile();

                    animal0.SerialNumber = "00001";

                    animal1.SerialNumber    = "00002";
                    animal1.BodyTemperature = 34;

                    session.Save(animal0);
                    session.Save(animal1);
                    tran.Commit();
                }
            }
        }
Esempio n. 2
0
		protected override void OnSetUp()
		{
			using(var session=OpenSession())
			{
				using (var tran = session.BeginTransaction())
				{

					var animal0 = new Animal();
					var animal1 = new Reptile();

					animal0.SerialNumber = "00001";

					animal1.SerialNumber = "00002";
					animal1.BodyTemperature = 34;

					session.Save(animal0);
					session.Save(animal1);
					tran.Commit();
				}
			}
		}