IDBContextExecuteScalarAsyncT Method

Relativity API
Asynchronously executes a call to SQL and returns the value in the first column of the first row in the result set returned by the query. Additional columns or rows are ignored. The value to be returned is coerced to the struct specified in T.

Namespace:  Relativity.API
Assembly:  Relativity.API (in Relativity.API.dll) Version: 17.0.1.1 588f15fd7550dbf54835f3417a0142d4ea37dbb5
Syntax

Task<T> ExecuteScalarAsync<T>(
	IQuery query
)

Parameters

query
Type: Relativity.API.ContextIQuery
the IQuery settings to present to the call to the SQL database.

Type Parameters

T
a struct type to which the return value is coerced.

Return Value

Type: TaskT
a T value specified in the first column of the first row in the result set returned by the call to the database. If the database call returns DBNull then the returned value will be default(T). As per ExecuteScalar and its async equivalent, only the first 2033 characters are returned.
See Also

Reference