Consider the following classes
public class Base { public int SomeId { get; set;} }
public class Child: Base { }
Using the following code will fail due to the SomeId property not existing on the child class:
var someIds = new[] { 1, 2, 3};
using (var db = new DbRepository<SqlConnection>(connectionString)) { return db.Query<Child>(c => someIds.Contains(c.SomeId)); }
Consider the following classes
public class Base { public int SomeId { get; set;} }public class Child: Base { }Using the following code will fail due to the SomeId property not existing on the child class:
var someIds = new[] { 1, 2, 3};using (var db = new DbRepository<SqlConnection>(connectionString)) { return db.Query<Child>(c => someIds.Contains(c.SomeId)); }