Table of Contents

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

call BoundCall<NonQueryKind>

The bound call.

cancellationToken CancellationToken

The 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

call is a default value, which is bound to nothing.

OperationCanceledException

cancellationToken is canceled.