Skip to content

Instantly share code, notes, and snippets.

@matthewrwilton
Created May 18, 2016 12:48
Show Gist options
  • Save matthewrwilton/ae7224c3b780d19a3be0a9e85c188b6f to your computer and use it in GitHub Desktop.
Save matthewrwilton/ae7224c3b780d19a3be0a9e85c188b6f to your computer and use it in GitHub Desktop.
public async Task<List<Data>> ExecuteQuery(string sql)
{
var results = new List<Data>();
await _querier.ExecuteReaderAsync(sql, async reader =>
{
while (await reader.ReadAsync())
{
results.Add(ReadData(reader));
}
});
return results;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment