ExecuteQueryAsync Method
ExecuteQueryAsync(String, Object[], SqlStatementOptions, CancellationToken)
Executes a SQL query.
Declaration
Task<ISqlQueryResult> ExecuteQueryAsync(string sql, object[] parameters = null, SqlStatementOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Parameters
| String | sql | The SQL query text to execute. |
| Object[] | parameters | Parameters for the SQL query. |
| SqlStatementOptions | options | Options for the SQL query (defaults to Default). |
| CancellationToken | cancellationToken | A cancellation token. |
Returns
| Task<ISqlQueryResult> | An ISqlQueryResult instance that represents the result of the query. |
Remarks
The sql query text can contain parameter placeholders, specified via a '?' character. Each
occurrence of the '?' character is replaced by the next parameter from the parameters ordered list.