Skip to content

Commit

Permalink
Fixed the IsDefined-check
Browse files Browse the repository at this point in the history
  • Loading branch information
PawelGerr committed Jan 23, 2022
1 parent 0246ea2 commit 5455ac9
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ private static IsolationLevel ValidateIsolationLevel(IsolationLevel? isolationLe
if (!isolationLevel.HasValue)
return IsolationLevel.ReadCommitted;

if (Enum.IsDefined(isolationLevel.Value))
if (!Enum.IsDefined(isolationLevel.Value))
throw new ArgumentException($"The provided isolation level '{isolationLevel}' is invalid.", nameof(isolationLevel));

if (isolationLevel < IsolationLevel.ReadCommitted)
Expand Down

0 comments on commit 5455ac9

Please sign in to comment.