public async Task ReadFromLoadAsync() { ISession s = OpenSession(); EnumStringClass basic = (EnumStringClass)await(s.LoadAsync(typeof(EnumStringClass), 1)); Assert.AreEqual(SampleEnum.Dimmed, basic.EnumValue); EnumStringClass basic2 = (EnumStringClass)await(s.LoadAsync(typeof(EnumStringClass), 2)); Assert.AreEqual(SampleEnum.On, basic2.EnumValue); s.Close(); }
public void ReadFromLoad() { ISession s = OpenSession(); EnumStringClass basic = (EnumStringClass)s.Load(typeof(EnumStringClass), 1); Assert.AreEqual(SampleEnum.Dimmed, basic.EnumValue); EnumStringClass basic2 = (EnumStringClass)s.Load(typeof(EnumStringClass), 2); Assert.AreEqual(SampleEnum.On, basic2.EnumValue); s.Close(); }
protected override void OnSetUp() { EnumStringClass basic = new EnumStringClass(); basic.Id = 1; basic.EnumValue = SampleEnum.Dimmed; EnumStringClass basic2 = new EnumStringClass(); basic2.Id = 2; basic2.EnumValue = SampleEnum.On; ISession s = OpenSession(); s.Save(basic); s.Save(basic2); s.Flush(); s.Close(); }
protected override void OnSetUp() { EnumStringClass basic = new EnumStringClass(); basic.Id = 1; basic.EnumValue = SampleEnum.Dimmed; EnumStringClass basic2 = new EnumStringClass(); basic2.Id = 2; basic2.EnumValue = SampleEnum.On; ISession s = OpenSession(); s.Save(basic); s.Save(basic2); s.Flush(); s.Close(); }