private IDataReader ExecuteReader(IDbCommand command, CommandBehavior behavior) { Tuple <string, bool>[] sessionSettings = null; return(_commandRetryPolicy.ExecuteAction <IDataReader>(() => { VerifyConnectionOpen(command); sessionSettings = CacheOrReplaySessionSettings(command, sessionSettings); return command.ExecuteReader(behavior); })); }
/// <summary> /// Opens a database connection with the settings specified by the ConnectionString /// property of the provider-specific Connection object. /// </summary> public override void Open() { // Check if retry policy was specified, if not, disable retries by executing the Open method using RetryPolicy.NoRetry. _connectionRetryPolicy.ExecuteAction(() => { if (_underlyingConnection.State != ConnectionState.Open) { _underlyingConnection.Open(); } SetLockAndCommandTimeout(_underlyingConnection); SetDefaultAnsiSettings(_underlyingConnection, IsSqlDwConnection(_underlyingConnection)); }); }