ExecuteCommandAsync Method
ExecuteCommandAsync(ISqlService, string, params object[])
Executes an SQL command.
Declaration
public static Task<long> ExecuteCommandAsync(this ISqlService service, string sql, params object[] parameters)
Parameters
| ISqlService | service | The ISqlService which executes the command. |
| string | sql | The SQL command text to execute. |
| object[] | parameters | Parameters for the SQL command. |
Returns
| Task<long> | The number of rows affected byt the command. |
ExecuteCommandAsync(ISqlService, string, SqlStatementOptions, CancellationToken)
Executes an SQL command.
Declaration
public static Task<long> ExecuteCommandAsync(this ISqlService service, string sql, SqlStatementOptions options, CancellationToken cancellationToken = default)
Parameters
| ISqlService | service | The ISqlService which executes the command. |
| string | sql | The SQL command text to execute. |
| SqlStatementOptions | options | Options for the SQL command. |
| CancellationToken | cancellationToken | A cancellation token. |
Returns
| Task<long> | The number of rows affected byt the command. |