예제 #1
0
		public void CanGetEnumValue()
		{
			using (var con = OpenDbConnection())
			{
				con.CreateTable<TypeWithEnum>(true);
				var obj = new TypeWithEnum {Id = 1, EnumValue = SomeEnum.Value1};
				con.Save(obj);
				var target = con.GetById<TypeWithEnum>(obj.Id);
				Assert.AreEqual(obj.Id, target.Id);
				Assert.AreEqual(obj.EnumValue, target.EnumValue);
			}
		}
예제 #2
0
 public void CanGetEnumValue()
 {
     using (var con = OpenDbConnection())
     {
         con.CreateTable <TypeWithEnum>(true);
         var obj = new TypeWithEnum {
             Id = 1, EnumValue = SomeEnum.Value1
         };
         con.Save(obj);
         var target = con.GetById <TypeWithEnum>(obj.Id);
         Assert.AreEqual(obj.Id, target.Id);
         Assert.AreEqual(obj.EnumValue, target.EnumValue);
     }
 }