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); }
/// <inheritdoc cref="DbConnection.CreateDbCommand()" /> protected override DbCommand CreateDbCommand() { EnsureNotDisposed(); return(new AdoNetProfilerDbCommand(WrappedConnection.CreateCommand(), this, Profiler)); }
/// <inheritdoc cref="DbConnection.CreateDbCommand()" /> protected override DbCommand CreateDbCommand() { return(new AdoNetProfilerDbCommand(WrappedConnection.CreateCommand(), this, Profiler)); }