IDaoExecuteSQLAsync Method (ITransaction, CancellationToken, String, Object) |
Async variant of
ExecuteSQL(ITransaction, String, Object)
Executes the specified plain SQL query using this DAO. Every parameter value is converted into one or more parameters which have to
be pre-defined in the sqlQuery
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<int> ExecuteSQLAsync(
ITransaction containingTransaction,
CancellationToken cancellationToken,
string sqlQuery,
Object parameterValues = null
)
Function ExecuteSQLAsync (
containingTransaction As ITransaction,
cancellationToken As CancellationToken,
sqlQuery As String,
Optional parameterValues As Object = Nothing
) As Task(Of Integer)
Parameters
- containingTransaction
- Type: SD.LLBLGen.Pro.ORMSupportClassesITransaction
A containing transaction if caller is added to a transaction, or null of not. - cancellationToken
- Type: System.ThreadingCancellationToken
The cancellation token. - sqlQuery
- Type: SystemString
The SQL query to execute. 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.
Return Value
Type:
TaskInt32
The value returned by the executed DbCommand. In general this is the number of rows affected by the executed sqlQuery
See Also