ExecuteScalarAsync Method
Definition
ExecuteScalarAsync(DataStatement, CancellationToken)
Asynchronously executes the command statement, and returns the value from the first column of the first row in the result set. Additional columns or rows are ignored.
public Task<object> ExecuteScalarAsync(DataStatement statement, CancellationToken ct = default)
Parameters
statementDataStatementThe command statement to execute.
ctCancellationTokenA token to cancel the asynchronous operation.