Esempio n. 1
0
        protected override DbCommand CreateDbCommand()
        {
            var cmd = InnerConnection.CreateCommand();

            cmd.Transaction = CurrentTransaction;
            return(cmd);
        }
Esempio n. 2
0
        /// <summary>
        /// Creates a DbCommand for calls to the database.
        /// </summary>
        /// <returns>A ReliableCommand.</returns>
        protected override DbCommand CreateDbCommand()
        {
            DbCommand command = InnerConnection.CreateCommand();

            if (InnerTransaction != null)
            {
                command.Transaction = InnerTransaction;
            }
            return(new ReliableCommand(RetryStrategy, this, command));
        }
Esempio n. 3
0
        /// <summary>
        /// Creates a DbCommand for calls to the database.
        /// </summary>
        /// <returns>A ReliableCommand.</returns>
        protected override DbCommand CreateDbCommand()
        {
            var command = new ReliableCommand(RetryStrategy, this, InnerConnection.CreateCommand());

            try
            {
                if (InnerTransaction != null)
                {
                    command.Transaction = InnerTransaction;
                }
                return(command);
            }
            catch
            {
                command.Dispose();
                throw;
            }
        }
Esempio n. 4
0
        /// <summary>
        /// Creates a DbCommand for calls to the database.
        /// </summary>
        /// <returns>A ReliableCommand.</returns>
        protected override DbCommand CreateDbCommand()
        {
            var command    = new RecordingDbCommand(InnerConnection.CreateCommand(), this);
            var disposable = command;

            try
            {
                // if we have a default command timeout, then set it on the command
                if (CommandTimeout.HasValue)
                {
                    command.CommandTimeout = CommandTimeout.Value;
                }

                disposable = null;
                return(command);
            }
            finally
            {
                if (disposable != null)
                {
                    disposable.Dispose();
                }
            }
        }
 protected override DbCommand CreateDbCommand()
 {
     return(new SpywalkingDbCommand(InnerConnection.CreateCommand(), this));
 }
 /// <summary>
 /// create the database command.
 /// </summary>
 /// <returns>The <see cref="DbCommand"/>.</returns>
 protected override DbCommand CreateDbCommand()
 {
     return(new ProfiledDbCommand(InnerConnection.CreateCommand(), this, DbProfiler));
 }
Esempio n. 7
0
 protected override DbCommand CreateDbCommand()
 {
     return(new GlimpseProfileDbCommand(InnerConnection.CreateCommand(), Stats));
 }
Esempio n. 8
0
 protected override DbCommand CreateDbCommand()
 {
     return(new ReliableDbCommandWrapper(InnerConnection.CreateCommand(), _retryPolicy));
 }
Esempio n. 9
0
 /// <inheritdoc/>
 protected override DbCommand CreateDbCommand()
 {
     return(new OptimisticCommand(this, InnerConnection.CreateCommand()));
 }
Esempio n. 10
0
 protected override DbCommand CreateDbCommand()
 {
     return(new GlimpseDbCommand(InnerConnection.CreateCommand(), this));
 }
Esempio n. 11
0
 /// <inheritdoc/>
 protected override DbCommand CreateDbCommand()
 {
     return(new NpgsqlCommandWithRecordsets(this, InnerConnection.CreateCommand()));
 }
Esempio n. 12
0
 /// <summary>
 /// Creates a DbCommand for calls to the database.
 /// </summary>
 /// <returns>A ReliableCommand.</returns>
 protected override DbCommand CreateDbCommand()
 {
     return(new ReliableCommand(RetryStrategy, this, InnerConnection.CreateCommand()));
 }
 protected override DbCommand CreateDbCommand()
 {
     return(new SpecializedProfiledDbCommand(InnerConnection.CreateCommand(), InnerConnection, Profiler));
 }