IDaoFetchScalarQueryAsyncT Method (CancellationToken, ITransaction, PlainSQLFetchAspects, String, Object) |
Namespace:
SD.LLBLGen.Pro.ORMSupportClasses
Assembly:
SD.LLBLGen.Pro.ORMSupportClasses (in SD.LLBLGen.Pro.ORMSupportClasses.dll) Version: 5.4.0.0 (5.4.0)
Syntax Task<T> FetchScalarQueryAsync<T>(
CancellationToken cancellationToken,
ITransaction containingTransaction,
PlainSQLFetchAspects fetchAspects,
string sqlQuery,
Object parameterValues = null
)
Function FetchScalarQueryAsync(Of T) (
cancellationToken As CancellationToken,
containingTransaction As ITransaction,
fetchAspects As PlainSQLFetchAspects,
sqlQuery As String,
Optional parameterValues As Object = Nothing
) As Task(Of T)
Parameters
- cancellationToken
- Type: System.ThreadingCancellationToken
the cancellationToken - containingTransaction
- Type: SD.LLBLGen.Pro.ORMSupportClassesITransaction
A containing transaction if caller is added to a transaction, or null of not. - fetchAspects
- Type: SD.LLBLGen.Pro.ORMSupportClassesPlainSQLFetchAspects
The fetch aspects for this query. Can be null, in which case the defaults are used. - sqlQuery
- Type: SystemString
The SQL query to execute, which returns a scalar value. Should contain parameter names for the parameter values, or placeholders for parameter sets.
See documentation for details regarding format specifics. - parameterValues (Optional)
- Type: SystemObject
The object containing the parameter values to use in the query. If it's an object array, parameters using ordening are assumed, otherwise
for each public, non-static property, a parameter is created.
Type Parameters
- T
- The type of the scalar value to return.
Return Value
Type:
TaskTThe first scalar value returned by the query as an instance of T or null if the query returned a NULL.
See Also