public FormatSql ( SqlTiming timing ) : string | ||
timing | SqlTiming | The |
Результат | string |
public string FormatSql(SqlTiming timing) { var sqlFormatter = new SqlServerFormatter(); var sqlFormat = sqlFormatter.FormatSql(timing); var poorMansFormatter = new TSqlStandardFormatter(); var fullFormatter = new SqlFormattingManager(poorMansFormatter); return fullFormatter.Format(sqlFormat); }
private void LogCommandAsError(Exception exception, ExecuteType type) { var formatter = new SqlServerFormatter(); SqlTiming timing = new SqlTiming(this, type, null); exception.Data["SQL"] = formatter.FormatSql(timing); }