diff --git a/build.props b/build.props index e610a82..89a8182 100644 --- a/build.props +++ b/build.props @@ -4,7 +4,7 @@ All 13.0 Enable - 7.2.0 + 7.3.0 diff --git a/pack.props b/pack.props index 968f590..c69246f 100644 --- a/pack.props +++ b/pack.props @@ -36,7 +36,7 @@ To support different LINQ implementations, the following flavours are available. MIT http://nein.tech/nein-linq README.md - Added support for EF Core 9. + Fixed usage of EF Core 9 on .NET 8. LINQ;EF;IX diff --git a/src/NeinLinq.EntityFrameworkCore/EntityQueryProviderAdapter.cs b/src/NeinLinq.EntityFrameworkCore/EntityQueryProviderAdapter.cs index ecd9459..c588833 100644 --- a/src/NeinLinq.EntityFrameworkCore/EntityQueryProviderAdapter.cs +++ b/src/NeinLinq.EntityFrameworkCore/EntityQueryProviderAdapter.cs @@ -1,4 +1,3 @@ -using Microsoft.EntityFrameworkCore.Query; using Microsoft.EntityFrameworkCore.Query.Internal; namespace NeinLinq; @@ -12,7 +11,7 @@ internal sealed class EntityQueryProviderAdapter : EntityQueryProvider public ExpressionVisitor Rewriter => provider.Rewriter; public EntityQueryProviderAdapter(RewriteEntityQueryProvider provider) - : base(new EmptyQueryCompiler()) + : base(null!) { this.provider = provider; } @@ -31,24 +30,6 @@ public override object Execute(Expression expression) public override TResult ExecuteAsync(Expression expression, CancellationToken cancellationToken = default) => provider.ExecuteAsync(expression, cancellationToken); - - private sealed class EmptyQueryCompiler : IQueryCompiler - { - public Func CreateCompiledAsyncQuery(Expression query) - => throw new NotSupportedException(); - - public Func CreateCompiledQuery(Expression query) - => throw new NotSupportedException(); - - public TResult Execute(Expression query) - => throw new NotSupportedException(); - - public TResult ExecuteAsync(Expression query, CancellationToken cancellationToken) - => throw new NotSupportedException(); - - public Expression> PrecompileQuery(Expression query, bool async) - => throw new NotSupportedException(); - } } #pragma warning restore EF1001 diff --git a/test/.globalconfig b/test/.globalconfig index a93ddb5..5b21b89 100644 --- a/test/.globalconfig +++ b/test/.globalconfig @@ -11,3 +11,6 @@ dotnet_diagnostic.CA1852.severity = none # Do not directly await a Task dotnet_diagnostic.CA2007.severity = none + +# xUnit CancellationTokens +dotnet_diagnostic.xUnit1051.severity = none diff --git a/test/Directory.Build.props b/test/Directory.Build.props index dc6872a..2f656ec 100644 --- a/test/Directory.Build.props +++ b/test/Directory.Build.props @@ -5,7 +5,6 @@ NeinLinq.Tests net9.0;net8.0 - $(NoWarn);xUnit1051 Exe