The Oracle client doesn't override the async versions of the methods. They use the default DbCommand
implementnations which call the non-async versions of the methods.
For example, the implementation of ExecuteNonQueryAsync
is:
// System.Data.Common.DbCommand
public virtual Task<int> ExecuteNonQueryAsync(CancellationToken cancellationToken)
{
if (cancellationToken.IsCancellationRequested)
{
return ADP.CreatedTaskWithCancellation<int>();
}
CancellationTokenRegistration cancellationTokenRegistration = default(CancellationTokenRegistration);
if (cancellationToken.CanBeCanceled)
{
cancellationTokenRegistration = cancellationToken.Register(new Action(this.CancelIgnoreFailure));
}
Task<int> result;
try
{
result = Task.FromResult<int>(this.ExecuteNonQuery());
}
catch (Exception ex)
{
cancellationTokenRegistration.Dispose();
result = ADP.CreatedTaskWithException<int>(ex);
}
return result;
}
As you can see, it simply calls ExecuteNonQuery
under the hood (the no-parameter overload of ExecuteNonQueryAsync
calls this version of the method).