How to map to a Dictionary object from database results using Dapper Dot Net?
15:42 08 Feb 2013

If I have a simple query such as:

string sql = "SELECT UniqueString, ID  FROM Table";

and I want to map it to a dictionary object such as:

Dictionary myDictionary = new Dictionary();      

How would I do this with Dapper?

I assume it is something like:

myDictionary = conn.Query(sql, new {  }).ToDictionary();

But can't figure out the proper syntax.

c# asp.net dapper