There’s various ways already shown; personally I’d just use the non-generic api:
var dict = conn.Query(sql, args).ToDictionary(
row => (string)row.UniqueString,
row => (int)row.Id);
There’s various ways already shown; personally I’d just use the non-generic api:
var dict = conn.Query(sql, args).ToDictionary(
row => (string)row.UniqueString,
row => (int)row.Id);