From my question on SO:
http://stackoverflow.com/questions/6711012/dapper-like-operator-using-dynamicpar
ameters
----------------------------------
This works:
var list = conn.Query<int>(
"select Id from Person where Id in @ids",
new { ids = new int[] { 1, 2, 3 } }
);
This throws "No mapping exists from object type System.Int32[] to a known
managed provider native type.":
DynamicParameters parameters = new DynamicParameters(
new { ids = new int[] { 1, 2, 3 } }
);
var list2 = conn.Query<int>(
"select Id from Person where Id in @ids",
parameters
);
Original issue reported on code.google.com by tma...@gmail.com on 15 Jul 2011 at 7:45
Original issue reported on code.google.com by
tma...@gmail.com
on 15 Jul 2011 at 7:45