protected override DbCommand CreateDbCommand()
        {
            var profiler = TempDisableLogging ? null : _profiler;
            var command  = new CustomProfiledDbCommand(WrappedConnection.CreateCommand(), this, profiler);

            TempDisableLogging = false; //一時的に無効にするだけなのでfalseに戻す。

            if (CommandTimeout != null)
            {
                command.CommandTimeout = CommandTimeout.Value;
            }

            return(command);
        }
Beispiel #2
0
 /// <inheritdoc cref="DbConnection.CreateDbCommand()" />
 protected override DbCommand CreateDbCommand()
 {
     EnsureNotDisposed();
     return(new AdoNetProfilerDbCommand(WrappedConnection.CreateCommand(), this, Profiler));
 }
Beispiel #3
0
 /// <inheritdoc cref="DbConnection.CreateDbCommand()" />
 protected override DbCommand CreateDbCommand()
 {
     return(new AdoNetProfilerDbCommand(WrappedConnection.CreateCommand(), this, Profiler));
 }