Skip to content

Commit

Permalink
CodeQL fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
RikuVirtanen committed Feb 12, 2024
1 parent e97f631 commit 46aebb8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -152,15 +152,8 @@ public async Task TestExecuteProcedure_Scalar()
Parameters = null
};

foreach (var level in transactionLevels)
foreach (var options in transactionLevels.Select(e => new Options { SqlTransactionIsolationLevel = e, CommandTimeoutSeconds = 2, ThrowErrorOnFailure = true}))
{
var options = new Options()
{
SqlTransactionIsolationLevel = level,
CommandTimeoutSeconds = 2,
ThrowErrorOnFailure = true
};

// Insert rows
var insert = await MicrosoftSQL.ExecuteProcedure(inputInsert, options, default);
Assert.IsTrue(insert.Success);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ private static async Task<Result> ExecuteHandler(Input input, Options options, S
Result result;
object dataObject;
SqlDataReader dataReader = null;
var table = new DataTable();
using var table = new DataTable();

try
{
Expand Down

0 comments on commit 46aebb8

Please sign in to comment.