public void ReadWrite()
		{
			Int32 id;
			ISession s = OpenSession();
			HiLoInt32Class b = new HiLoInt32Class();
			s.Save(b);
			s.Flush();
			id = b.Id;
			s.Close();

			s = OpenSession();
			b = (HiLoInt32Class) s.Load(typeof(HiLoInt32Class), b.Id);
			Assert.AreEqual(id, b.Id);
			s.Delete(b);
			s.Flush();
			s.Close();
		}
        public void ReadWrite()
        {
            Int32          id;
            ISession       s = OpenSession();
            HiLoInt32Class b = new HiLoInt32Class();

            s.Save(b);
            s.Flush();
            id = b.Id;
            s.Close();

            s = OpenSession();
            b = (HiLoInt32Class)s.Load(typeof(HiLoInt32Class), b.Id);
            Assert.AreEqual(id, b.Id);
            s.Delete(b);
            s.Flush();
            s.Close();
        }
Exemple #3
0
        public async Task ReadWriteAsync()
        {
            Int32          id;
            ISession       s = OpenSession();
            HiLoInt32Class b = new HiLoInt32Class();

            await(s.SaveAsync(b));
            await(s.FlushAsync());
            id = b.Id;
            s.Close();

            s = OpenSession();
            b = (HiLoInt32Class)await(s.LoadAsync(typeof(HiLoInt32Class), b.Id));
            Assert.AreEqual(id, b.Id);
            await(s.DeleteAsync(b));
            await(s.FlushAsync());
            s.Close();
        }