SqlHelper.ExecuteReader method (1 of 2)
Executes the command returning a data reader.
public static IDataReader ExecuteReader(IDbConnection connection, string commandText,
IReadOnlyDictionary<string, object?>? param, ILogger? logger = null)
| parameter | description |
|---|---|
| connection | The connection. |
| commandText | The command text. |
| param | The parameters. |
| logger | The logger. |
Return Value
A data reader with the results.
Exceptions
| exception | condition |
|---|---|
| ArgumentNullException | connection is null. |
See Also
- class SqlHelper
SqlHelper.ExecuteReader method (2 of 2)
Executes the query.
public static IDataReader ExecuteReader(this SqlQuery query, IDbConnection connection,
IReadOnlyDictionary<string, object?>? parameters = null, ILogger? logger = null)
| parameter | description |
|---|---|
| query | The query. |
| connection | The connection. |
| parameters | Parameter values that override the query's parameters, or the query's parameters when null. |
| logger | The logger. |
Return Value
A data reader with the results.
Remarks
When overrides are supplied, they are merged over the query parameters into a new dictionary. Neither input dictionary is modified.