Skip to content

Commit

Permalink
wip: removed commented code
Browse files Browse the repository at this point in the history
  • Loading branch information
ckadluba committed Nov 13, 2024
1 parent 9f9c90d commit 7b5eba2
Showing 1 changed file with 0 additions and 33 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,39 +51,6 @@ public async Task WriteEvents(IEnumerable<LogEvent> events)

foreach (var logEvent in events)
{
// using (var command = _sqlCommandFactory.CreateCommand(cn))
// {
// command.CommandType = CommandType.Text;
//
// var fieldList = new StringBuilder(Invariant($"INSERT INTO [{_schemaName}].[{_tableName}] ("));
// var parameterList = new StringBuilder(") VALUES (");
//
// var index = 0;
// foreach (var field in _logEventDataGenerator.GetColumnsAndValues(logEvent))
// {
// if (index != 0)
// {
// fieldList.Append(',');
// parameterList.Append(',');
// }
//
// fieldList.Append(Invariant($"[{field.Key}]"));
// parameterList.Append("@P");
// parameterList.Append(index);
//
// command.AddParameter(Invariant($"@P{index}"), field.Value);
//
// index++;
// }
//
// parameterList.Append(')');
// fieldList.Append(parameterList);
//
// command.CommandText = fieldList.ToString();
//
// await command.ExecuteNonQueryAsync().ConfigureAwait(false);
// }

var fields = _logEventDataGenerator.GetColumnsAndValues(logEvent).ToList();
InitializeSqlCommand(cn, fields);

Expand Down

0 comments on commit 7b5eba2

Please sign in to comment.