Skip to content

Instantly share code, notes, and snippets.

@brazilnut2000
Created August 17, 2015 20:46
Show Gist options
  • Save brazilnut2000/5c1ee980b495af5ebe52 to your computer and use it in GitHub Desktop.
Save brazilnut2000/5c1ee980b495af5ebe52 to your computer and use it in GitHub Desktop.
Dapper: Execute Scalar query
int value = conn.Query<int>(sql, args).Single();
string value = conn.Query<string>(sql, args).Single();
http://stackoverflow.com/questions/8050636/is-there-an-executescalar-in-dapper
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment