IDBContextExecuteObjectAsyncT Method

Relativity API
Asynchronously executes a call to SQL and presents the resultant IDataReader to the supplied converter.

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

Task<T> ExecuteObjectAsync<T>(
	IQuery query,
	Func<IDataReader, CancellationToken, Task<T>> converter
)

Parameters

query
Type: Relativity.API.ContextIQuery
the IQuery settings to present to the call to the SQL database.
converter
Type: SystemFuncIDataReader, CancellationToken, TaskT
An asynchronous delegate used to convert the contents of a data reader into an object of type T

Type Parameters

T
The type to be returned by the converter

Return Value

Type: TaskT
the output of the converter
Remarks

The reader is initialized with a call to Read (or ReadAsync where applicable). If the reader is null or the Read/ReadAsync returns false, the reader is not fed to the converter
See Also

Reference