Click or drag to resize
ConnectionHelperExecuteNonQueryAsync Method (String, CancellationToken, QueryDataParameters, QueryMacros)

Executes the query asynchronously and returns the number of rows affected.

The cancellation token can be used to request that the operation be abandoned before the command timeout elapses. Exceptions will be reported via the returned Task object.

Namespace: CMS.DataEngine
Assembly: CMS.DataEngine (in CMS.DataEngine.dll) Version: 10.0.0
Syntax
C#
public static Task<int> ExecuteNonQueryAsync(
	string queryName,
	CancellationToken cancellationToken,
	QueryDataParameters parameters = null,
	QueryMacros macros = null
)

Parameters

queryName
Type: SystemString
Name of the query in format application.class.queryname
cancellationToken
Type: System.ThreadingCancellationToken
The cancellation instruction.
parameters (Optional)
Type: CMS.DataEngineQueryDataParameters
Query parameters.
macros (Optional)
Type: CMS.DataEngineQueryMacros
Query expressions.

Return Value

Type: TaskInt32
A task representing the asynchronous operation.
See Also