ExecuteCommand Method
Definition
- Assemblies
- Cuemon.Data.SqlClient.dll
ExecuteCommand<T>(DataStatement, Func<IDbCommand, T>)
Core method for executing methods on the DbCommand object resolved from the virtual execute command workflow on DataManager.
protected override T ExecuteCommand<T>(DataStatement statement, Func<IDbCommand, T> executeSelector)
Parameters
statementDataStatementThe command statement to execute.
executeSelectorFunc<IDbCommand, T>The function delegate that will invoke a method on the resolved DbCommand object.
Returns
- T
A value of
Tthat is equal to the invoked method of the DbCommand object.
Type Parameters
TThe type to return.
Remarks
If TransientFaultHandlingOptionsCallback is null, no SQL operation is wrapped inside a transient fault handling operation.
Otherwise, if TransientFaultHandlingOptionsCallback has the EnableRecovery set to true, this method will, with it's default implementation, try to gracefully recover from transient faults when the following condition is met:
RetryAttempts is less than the current attempt starting from 1 with a maximum of MaxValue retries
DetectionStrategy must evaluate to true
In case of a transient failure the default implementation will use RetryStrategy.
In any other case the originating exception is thrown.