Пример #1
0
        protected override DbCommand CreateDbCommand()
        {
            var cmd = InnerConnection.CreateCommand();

            cmd.Transaction = CurrentTransaction;
            return(cmd);
        }
Пример #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));
        }
Пример #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;
            }
        }
Пример #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));
 }
Пример #7
0
 protected override DbCommand CreateDbCommand()
 {
     return(new GlimpseProfileDbCommand(InnerConnection.CreateCommand(), Stats));
 }
Пример #8
0
 protected override DbCommand CreateDbCommand()
 {
     return(new ReliableDbCommandWrapper(InnerConnection.CreateCommand(), _retryPolicy));
 }
Пример #9
0
 /// <inheritdoc/>
 protected override DbCommand CreateDbCommand()
 {
     return(new OptimisticCommand(this, InnerConnection.CreateCommand()));
 }
Пример #10
0
 protected override DbCommand CreateDbCommand()
 {
     return(new GlimpseDbCommand(InnerConnection.CreateCommand(), this));
 }
Пример #11
0
 /// <inheritdoc/>
 protected override DbCommand CreateDbCommand()
 {
     return(new NpgsqlCommandWithRecordsets(this, InnerConnection.CreateCommand()));
 }
Пример #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));
 }