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

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

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

            s = OpenSession();
            b = (HiLoInt16Class)s.Load(typeof(HiLoInt16Class), b.Id);
            Assert.AreEqual(id, b.Id);
            s.Delete(b);
            s.Flush();
            s.Close();
        }
Пример #3
0
        public async Task ReadWriteAsync()
        {
            Int16          id;
            ISession       s = OpenSession();
            HiLoInt16Class b = new HiLoInt16Class();

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

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