Skip to content

Commit 9f895bc

Browse files
committed
Update parameters
1 parent 25ca672 commit 9f895bc

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • src/BenchmarksApps/TechEmpower/PlatformBenchmarks/Data

src/BenchmarksApps/TechEmpower/PlatformBenchmarks/Data/RawDb.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,8 +219,8 @@ public async Task<World[]> LoadMultipleUpdatesRows(int count)
219219
var update = "UPDATE world w SET randomnumber = u.new_val FROM (SELECT unnest($1) as id, unnest($2) as new_val) u WHERE w.id = u.id";
220220

221221
using var updateCmd = new NpgsqlCommand(update, connection);
222-
updateCmd.Parameters.AddWithValue("id", ids);
223-
updateCmd.Parameters.AddWithValue("new_val", numbers);
222+
updateCmd.Parameters.Add(new NpgsqlParameter<int[]> { TypedValue = ids });
223+
updateCmd.Parameters.Add(new NpgsqlParameter<int[]> { TypedValue = numbers });
224224

225225
await updateCmd.ExecuteNonQueryAsync();
226226

0 commit comments

Comments
 (0)