示例#1
0
        public void Can_select_Uri()
        {
            using (var db = OpenDbConnection())
            {
                db.DropAndCreateTable <PocoWithCustomTypes>();

                var dto = new PocoWithCustomTypes
                {
                    Uri = new Uri("http://a.com")
                };

                long id  = db.Insert(dto, selectIdentity: true);
                var  row = db.Single <PocoWithCustomTypes>(r => r.Id == id);

                Assert.That(row.Uri.ToString(), Is.EqualTo(dto.Uri.ToString()));
            }
        }
示例#2
0
        public void Can_select_Guid()
        {
            using (var db = OpenDbConnection())
            {
                db.DropAndCreateTable <PocoWithCustomTypes>();

                var dto = new PocoWithCustomTypes
                {
                    Guid = Guid.NewGuid()
                };

                long id  = db.Insert(dto, selectIdentity: true);
                var  row = db.Single <PocoWithCustomTypes>(r => r.Id == id);

                Assert.That(row.Guid, Is.EqualTo(dto.Guid));
            }
        }