Is it possible to use anonymous types with Dapper?
I can see how you can use dynamic i.e.
connection.Query(blah, blah, blah)
Is it possible to use anonymous types with Dapper?
Sure see the non-generic Query override, it return a dynamic IDictionary this object is an expando that can either be cast or accessed with dot notation.
Eg:
var v = connection.Query("select 1 as a, 2 as b").First();
Console.Write("{0} {1}",v.a, v.b) // prints: 1 2
is it then possible to do a
.Select
Sure, you get an IEnumerable ... you can run anything you want on that.