/// <summary>
        /// Opens a database connection with the connection settings specified in the ConnectionString property of the connection object.
        /// Uses the default retry policy when opening the connection.
        /// </summary>
        /// <param name="connection">The connection object that is required as per extension method declaration.</param>
        public static void OpenWithRetry(this IDbConnection connection)
        {
            var connectionString = connection.ConnectionString ?? string.Empty;
            var retryPolicy      = RetryPolicyFactory.GetDefaultSqlConnectionRetryPolicyByConnectionString(connectionString);

            OpenWithRetry(connection, retryPolicy);
        }
        /// <summary>
        /// Sends the specified command to the connection and builds a SqlDataReader object containing the results.
        /// Uses the specified retry policy when executing the command.
        /// </summary>
        /// <param name="command">The command object that is required as per extension method declaration.</param>
        /// <param name="retryPolicy">The retry policy defining whether to retry a command if a connection fails while executing the command.</param>
        /// <returns>A System.Data.IDataReader object.</returns>
        public static IDataReader ExecuteReaderWithRetry(this IDbCommand command, RetryPolicy retryPolicy)
        {
            var connectionString = command.Connection.ConnectionString ?? string.Empty;

            return(ExecuteReaderWithRetry(command, retryPolicy, RetryPolicyFactory.GetDefaultSqlConnectionRetryPolicyByConnectionString(connectionString)));
        }