ExecuteCommandAsync Method
ExecuteCommandAsync(String, Object[], SqlStatementOptions, CancellationToken)
Executes a SQL command.
Declaration
Task<long> ExecuteCommandAsync(string sql, object[] parameters = null, SqlStatementOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Parameters
| String | sql | The SQL command text to execute. |
| Object[] | parameters | Parameters for the SQL command. |
| SqlStatementOptions | options | Options for the SQL command (defaults to Default). |
| CancellationToken | cancellationToken | A cancellation token. |
Returns
| Task<Int64> | The number of rows affected byt the command. |
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.