public void OnError(IDbCommand profiledDbCommand, SqlExecuteType executeType, Exception e) { var formatter = new Profiling.SqlFormatters.SqlServerFormatter(); var parameters = SqlTiming.GetCommandParameters(profiledDbCommand); e.Data["SQL"] = formatter.FormatSql(profiledDbCommand.CommandText, parameters); }
public void OnError(IDbCommand profiledDbCommand, Profiling.Data.SqlExecuteType executeType, Exception exception) { var formatter = new Profiling.SqlFormatters.SqlServerFormatter(); exception.Data["SQL"] = formatter.FormatSql(profiledDbCommand.CommandText, SqlTiming.GetCommandParameters(profiledDbCommand)); this.wrapped.OnError(profiledDbCommand, executeType, exception); }