static void Debug(BuildedSql info) { BuildedSqlLog?.Invoke(info); if (Log == null) { return; } Log(info.Text); foreach (var e in info.GetParams()) { Log(e.Key + " = " + (e.Value.Value == null ? string.Empty : e.Value.Value.ToString())); } Log(string.Empty); }
static void Debug(BuildedSql info) { BuildedSqlLog?.Invoke(info); if (Log == null) { return; } var list = new List <string>(); list.Add(info.Text); foreach (var e in info.GetParams()) { list.Add(e.Key + " = " + (e.Value.Value == null ? string.Empty : e.Value.Value.ToString())); } list.Add(string.Empty); Log(string.Join(Environment.NewLine, list.ToArray())); }