public void ReadWrite()
		{
			DoubleClass basic = new DoubleClass();
			basic.Id = 1;
			basic.DoubleValue = _values[0];

			ISession s = OpenSession();
			s.Save(basic);
			s.Flush();
			s.Close();

			s = OpenSession();
			basic = (DoubleClass) s.Load(typeof(DoubleClass), 1);

			Assert.AreEqual(_values[0], basic.DoubleValue);

			s.Delete(basic);
			s.Flush();
			s.Close();
		}
Ejemplo n.º 2
0
        public async Task ReadWriteAsync()
        {
            DoubleClass basic = new DoubleClass();

            basic.Id          = 1;
            basic.DoubleValue = _values[0];

            ISession s = OpenSession();

            await(s.SaveAsync(basic));
            await(s.FlushAsync());
            s.Close();

            s     = OpenSession();
            basic = (DoubleClass)await(s.LoadAsync(typeof(DoubleClass), 1));

            Assert.AreEqual(_values[0], basic.DoubleValue);

            await(s.DeleteAsync(basic));
            await(s.FlushAsync());
            s.Close();
        }
Ejemplo n.º 3
0
        public void ReadWrite()
        {
            DoubleClass basic = new DoubleClass();

            basic.Id          = 1;
            basic.DoubleValue = _values[0];

            ISession s = OpenSession();

            s.Save(basic);
            s.Flush();
            s.Close();

            s     = OpenSession();
            basic = (DoubleClass)s.Load(typeof(DoubleClass), 1);

            Assert.AreEqual(_values[0], basic.DoubleValue);

            s.Delete(basic);
            s.Flush();
            s.Close();
        }