public void OnError(DbCommand profiledDbCommand, StackExchange.Profiling.Data.ExecuteType executeType, Exception exception)
            {
                var formatter = new StackExchange.Profiling.SqlFormatters.SqlServerFormatter();
                var timing    = new StackExchange.Profiling.SqlTiming(profiledDbCommand, executeType, null);

                exception.Data["SQL"] = formatter.FormatSql(timing);
                this.wrapped.OnError(profiledDbCommand, executeType, exception);
            }
 public void OnError(DbCommand profiledDbCommand, StackExchange.Profiling.Data.ExecuteType executeType, Exception exception)
 {
     var formatter = new StackExchange.Profiling.SqlFormatters.SqlServerFormatter();
     var timing = new StackExchange.Profiling.SqlTiming(profiledDbCommand, executeType, null);
     exception.Data["SQL"] = formatter.FormatSql(timing);
     this.wrapped.OnError(profiledDbCommand, executeType, exception);
 }
Example #3
0
 public void OnError(IDbCommand profiledDbCommand, StackExchange.Profiling.Data.SqlExecuteType executeType, Exception exception)
 {
     var formatter = new StackExchange.Profiling.SqlFormatters.SqlServerFormatter();
     exception.Data["SQL"] = formatter.FormatSql(profiledDbCommand.CommandText, SqlTiming.GetCommandParameters(profiledDbCommand));
     this.wrapped.OnError(profiledDbCommand, executeType, exception);
 }