Table of Contents

ExecuteScalarAsync Method

Definition

Namespace
Cuemon.Data
Assemblies
Cuemon.Data.dll
Source
src/Cuemon.Data/DataManager.cs

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

statement DataStatement

The command statement to execute.

ct CancellationToken

A token to cancel the asynchronous operation.

Returns

Task<object>

A task that represents the asynchronous operation. The task result contains the first column of the first row in the result from statement.