public void ReadWrite() { BooleanClass basic = new BooleanClass(); basic.Id = 1; basic.BooleanValue = true; ISession s = OpenSession(); s.Save(basic); s.Flush(); s.Close(); s = OpenSession(); basic = (BooleanClass)s.Load( typeof(BooleanClass), 1 ); Assert.AreEqual( true, basic.BooleanValue ); s.Delete( basic ); s.Flush(); s.Close(); }
public void ReadWrite() { BooleanClass basic = new BooleanClass(); basic.Id = 1; basic.BooleanValue = true; ISession s = OpenSession(); s.Save(basic); s.Flush(); s.Close(); s = OpenSession(); basic = (BooleanClass)s.Load(typeof(BooleanClass), 1); Assert.AreEqual(true, basic.BooleanValue); s.Delete(basic); s.Flush(); s.Close(); }
public async Task ReadWriteAsync() { BooleanClass basic = new BooleanClass(); basic.Id = 1; basic.BooleanValue = true; ISession s = OpenSession(); await(s.SaveAsync(basic)); await(s.FlushAsync()); s.Close(); s = OpenSession(); basic = (BooleanClass)await(s.LoadAsync(typeof(BooleanClass), 1)); Assert.AreEqual(true, basic.BooleanValue); await(s.DeleteAsync(basic)); await(s.FlushAsync()); s.Close(); }