diff --git a/src/Thinktecture.EntityFrameworkCore.SqlServer.Testing/EntityFrameworkCore/Testing/SqlServerTestDbContextProvider.cs b/src/Thinktecture.EntityFrameworkCore.SqlServer.Testing/EntityFrameworkCore/Testing/SqlServerTestDbContextProvider.cs index d6d91c7c..d1a574bd 100644 --- a/src/Thinktecture.EntityFrameworkCore.SqlServer.Testing/EntityFrameworkCore/Testing/SqlServerTestDbContextProvider.cs +++ b/src/Thinktecture.EntityFrameworkCore.SqlServer.Testing/EntityFrameworkCore/Testing/SqlServerTestDbContextProvider.cs @@ -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)