Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save MirzaMerdovic/604327e4d8e54462ad98b709bf44c822 to your computer and use it in GitHub Desktop.
Save MirzaMerdovic/604327e4d8e54462ad98b709bf44c822 to your computer and use it in GitHub Desktop.
## Method
private static Task<IEnumerable<T>> QueryAnonymAsync<T>(IDbConnection connection, Func<T> typeBuilder, string sql)
{
return connection.QueryAsync<T>(sql, typeBuilder);
}
## Usage
return
await
QueryAnonymAsync(conn,
() => new {GameId = default(int), GameName = default(string), Description = default(string)},
sql);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment