ExecuteScalarAsync()
This method returns a Task-based asynchronous version of OracleCommand.ExecuteScalar()
, which returns the first column of the first row in the result set returned by the query.
Declaration
// C# public Task<object> ExecuteScalarAsync();
Return Value
Task<object>
object representing the asynchronous operation immediately without blocking the calling thread for the whole duration of the query execution.
Implements
DbCommand
Exceptions
InvalidOperationException
- The command cannot be executed.
Remarks
This will call into the ExecuteScalarAsync
implementation with argument ‘cancellationToken
’ passed as CancellationToken.None
.