Since the introduction of DapperTable (over FastExpando), multi-mapping to
dynamic objects populates the dynamic object with all values regardless of
splitOn property.
For example:
var results = cn.Query<dynamic, int, dynamic>(
"SELECT 1 Id, 'Mr' Title, 'John' Surname, 4 AddressCount",
(person, addressCount) =>
{
return person;
},
splitOn: "AddressCount"
).FirstOrDefault();
With the latest DapperTable source, 'person' is a dynamic object looking like:
{ Id = 1, Title = 'Mr', Surname = 'John', AddressCount = 4 }.
'addressCount' is still correct and is an int with the value 4.
However, the latest NuGet package which looks to contain the previous
FastExpando code, correctly assigns 'person' as: { Id = 1, Title = 'Mr',
Surname = 'John' }.
Original issue reported on code.google.com by mal.earn...@btinternet.com on 24 Feb 2013 at 11:55
Original issue reported on code.google.com by
mal.earn...@btinternet.com
on 24 Feb 2013 at 11:55