private async Task <IReadOnlyList <TResult> > ExecQueryList <TResult>(string sqlQuery, params IDbDataParameter[] parameters) where TResult : class { using (var reader = await ExecuteCommand(sqlQuery, parameters, cmd => cmd.ExecuteReaderAsync())) { var mapper = new SqlResultMapper <TResult>(); return(mapper.MapList(reader)); } }
/// <inheritdoc /> public async Task <TResult> ExecStoredProcSingle <TResult>(string sqlProcName, params IDbDataParameter[] parameters) where TResult : class { var sql = BuildSqlStoredProc(sqlProcName, parameters); using (var reader = await ExecuteCommand(sql, parameters, cmd => cmd.ExecuteReaderAsync())) { var mapper = new SqlResultMapper <TResult>(); return(mapper.MapSingle(reader)); } }