SqlExecutionHelperExecuteWithDeadlockRetryTResult Method |
Executes the given executionFunc while catching exception resulting from the execution. If the exception thrown contains SqlException as its inner exception and the Number equals to 1205 (deadlock), the execution is retried.
The execution is never retried if IsInTransaction indicates the execution is part of a transaction.
If the retry limit is reached, the exception resulting from the last execution is re-thrown.
Namespace: CMS.DataEngine
public static TResult ExecuteWithDeadlockRetry<TResult>( Func<TResult> executionFunc, int retryCount )
Exception | Condition |
---|---|
ArgumentNullException | Thrown when executionFunc is null. |