예제 #1
0
        public async Task ReadFromLoadAsync()
        {
            using (ISession s = OpenSession())
            {
                EnumCharClass basic = (EnumCharClass)await(s.LoadAsync(typeof(EnumCharClass), 1));
                Assert.AreEqual(SampleCharEnum.Dimmed, basic.EnumValue);

                EnumCharClass basic2 = (EnumCharClass)await(s.LoadAsync(typeof(EnumCharClass), 2));
                Assert.AreEqual(SampleCharEnum.On, basic2.EnumValue);
            }
        }
예제 #2
0
        public void ReadFromLoad()
        {
            using (ISession s = OpenSession())
            {
                EnumCharClass basic = (EnumCharClass)s.Load(typeof(EnumCharClass), 1);
                Assert.AreEqual(SampleCharEnum.Dimmed, basic.EnumValue);

                EnumCharClass basic2 = (EnumCharClass)s.Load(typeof(EnumCharClass), 2);
                Assert.AreEqual(SampleCharEnum.On, basic2.EnumValue);
            }
        }
		protected override void OnSetUp()
		{

			EnumCharClass basic = new EnumCharClass();
			basic.Id = 1;
			basic.EnumValue = SampleCharEnum.Dimmed;

			EnumCharClass basic2 = new EnumCharClass();
			basic2.Id = 2;
			basic2.EnumValue = SampleCharEnum.On;

			ISession s = OpenSession();
			s.Save(basic);
			s.Save(basic2);
			s.Flush();
			s.Close();
		}
예제 #4
0
        protected override void OnSetUp()
        {
            EnumCharClass basic = new EnumCharClass();

            basic.Id        = 1;
            basic.EnumValue = SampleCharEnum.Dimmed;

            EnumCharClass basic2 = new EnumCharClass();

            basic2.Id        = 2;
            basic2.EnumValue = SampleCharEnum.On;

            ISession s = OpenSession();

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