Skip to content

Commit

Permalink
Pass parameter names explicitly when using Dapper
Browse files Browse the repository at this point in the history
Fixes #2465
  • Loading branch information
odinserj committed Nov 8, 2024
1 parent a9c697d commit 0525de6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Hangfire.SqlServer/SqlServerConnection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ public override HashSet<string> GetAllItemsFromSet(string key)

var result = connection.Query<string>(
query,
new { key },
new { key = key },
commandTimeout: storage.CommandTimeout);

return new HashSet<string>(result);
Expand All @@ -414,7 +414,7 @@ public override List<string> GetFirstByLowestScoreFromSet(string key, double fro

var result = connection.Query<string>(
query,
new { count = pair.Value.Item3, pair.Key, from = pair.Value.Item1, to = pair.Value.Item2 },
new { count = pair.Value.Item3, key = pair.Key, from = pair.Value.Item1, to = pair.Value.Item2 },
commandTimeout: storage.CommandTimeout);

return result.ToList();
Expand Down Expand Up @@ -489,7 +489,7 @@ public override Dictionary<string, string> GetAllEntriesFromHash(string key)

var result = connection.Query<SqlHash>(
query,
new { key },
new { key = key },
commandTimeout: storage.CommandTimeout)
.ToDictionary(static x => x.Field, static x => x.Value);

Expand Down

0 comments on commit 0525de6

Please sign in to comment.