public void Can_select_on_generic_interface_implementation_properties_with_PrefixFieldWithTableName() { using (var db = OpenDbConnection()) { db.DropAndCreateTable <TestPocoImpl>(); var testPoco = new TestPocoImpl { DateCreated = DateTime.Now, Name = "Object 1" }; testPoco.Id = (int)db.Insert <TestPocoImpl>(testPoco, true); var rows = GetRows <TestPocoImpl>(db, testPoco.Id); Assert.That(rows.Count, Is.EqualTo(1)); } }
public void Can_select_on_generic_interface_implementation_properties_with_join() { using (var db = OpenDbConnection()) { db.DropAndCreateTable <TestPocoImpl>(); db.DropAndCreateTable <EntityAttribute>(); var testPoco = new TestPocoImpl { DateCreated = DateTime.Now, Name = "Object 1" }; testPoco.Id = (int)db.Insert <TestPocoImpl>(testPoco, true); var entityAttribute = new EntityAttribute { EntityType = "TestPocoImpl", EntityId = testPoco.Id, AttributeName = "Description", AttributeValue = "Some Object" }; db.Insert <EntityAttribute>(entityAttribute); var rows = GetRowsByIdWhereHasAnyAttributes <TestPocoImpl>(db, testPoco.Id); Assert.That(rows.Count, Is.EqualTo(1)); } }