Method ExecuteNonQueryAsync
- Namespace
- Open.Database.Extensions
- Assembly
- Open.Database.Extensions.Core.dll
ExecuteNonQueryAsync(BoundCall<NonQueryKind>, CancellationToken)
Runs the write and returns the number of rows affected.
public static ValueTask<int> ExecuteNonQueryAsync(this BoundCall<NonQueryKind> call, CancellationToken cancellationToken = default)
Parameters
callBoundCall<NonQueryKind>The bound call.
cancellationTokenCancellationTokenThe token that governs the call.
Returns
- ValueTask<int>
A task that represents the asynchronous operation; its result is the number of rows affected.
Remarks
The count is what the provider reports, which can be -1 (for example for
a procedure that sets NOCOUNT ON).
It is not a procedure's return value.
Exceptions
- InvalidOperationException
callis a default value, which is bound to nothing.- OperationCanceledException
cancellationTokenis canceled.