From 34a6a4b592ff7e0489ba6ffda293c4e045149ed8 Mon Sep 17 00:00:00 2001 From: Koen Bekkenutte <2912652+kbekkenutte@users.noreply.github.com> Date: Sun, 12 Dec 2021 20:12:50 +0800 Subject: [PATCH] Removed V1 support --- .github/workflows/build.yml | 17 +++++------------ Directory.Build.props | 19 +------------------ .../Internal/ProjectionOptionsExtension.cs | 15 --------------- .../IngoreNullConditionalRewriteTests.cs | 2 -- .../RewriteNullConditionalRewriteTests.cs | 2 -- 5 files changed, 6 insertions(+), 49 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 16cea80..ed8c60a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -23,22 +23,19 @@ jobs: strategy: matrix: os: [ubuntu-latest, windows-latest, macOS-latest] - dotnet-version: [6.0.x] - projectables-version: [1, 2] steps: - uses: actions/checkout@v2 - name: Setup .NET uses: actions/setup-dotnet@v1 with: - dotnet-version: ${{ matrix.dotnet-version }} - include-prerelease: True + dotnet-version: 6.0.x - name: Restore dependencies - run: dotnet restore /p:EFProjectablesVersion=${{ matrix.projectables-version }} + run: dotnet restore - name: Build - run: dotnet build --no-restore /p:EFProjectablesVersion=${{ matrix.projectables-version }} + run: dotnet build --no-restore - name: Test - run: dotnet test --no-build --verbosity normal /p:EFProjectablesVersion=${{ matrix.projectables-version }} + run: dotnet test --no-build --verbosity normal prerelease: needs: build @@ -50,11 +47,7 @@ jobs: uses: actions/setup-dotnet@v1 with: dotnet-version: 6.0.x - include-prerelease: True - - name: Pack v1 - run: | - dotnet pack -v normal -c DebugV1 --include-symbols --include-source -p:PackageVersion=1.0.0-pre-$GITHUB_RUN_ID -o nupkg - - name: Pack v2 + - name: Pack run: | dotnet pack -v normal -c Debug --include-symbols --include-source -p:PackageVersion=2.0.0-pre-$GITHUB_RUN_ID -o nupkg - name: Push to GitHub Feed diff --git a/Directory.Build.props b/Directory.Build.props index 23619ac..d2c3bad 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -20,28 +20,11 @@ Project over properties and functions in your linq queries - - 1 - - - - 2 - - 3.11.0 - - EFPROJECTABLES1 - netstandard2.0 - 3.1.0 - 3.1.0 - - 5.0.10 - - - + EFPROJECTABLES2 net6.0 6.0.0 diff --git a/src/EntityFrameworkCore.Projectables/Infrastructure/Internal/ProjectionOptionsExtension.cs b/src/EntityFrameworkCore.Projectables/Infrastructure/Internal/ProjectionOptionsExtension.cs index 118b073..df4d311 100644 --- a/src/EntityFrameworkCore.Projectables/Infrastructure/Internal/ProjectionOptionsExtension.cs +++ b/src/EntityFrameworkCore.Projectables/Infrastructure/Internal/ProjectionOptionsExtension.cs @@ -120,20 +120,6 @@ namespace EntityFrameworkCore.Projectables.Infrastructure.Internal debugInfo["Projectables:CompatibilityMode"] = Extension._compatibilityMode.ToString(); } -#if EFPROJECTABLES1 - public override long GetServiceProviderHashCode() - { - var hashCode = nameof(ProjectionOptionsExtension).GetHashCode(); - - var extension = (ProjectionOptionsExtension)Extension; - - hashCode ^= extension._compatibilityMode.GetHashCode(); - - return hashCode; - } -#endif - -#if EFPROJECTABLES2 public override int GetServiceProviderHashCode() { var hashCode = new HashCode(); @@ -146,7 +132,6 @@ namespace EntityFrameworkCore.Projectables.Infrastructure.Internal public override bool ShouldUseSameServiceProvider(DbContextOptionsExtensionInfo other) => other is ExtensionInfo otherInfo && Extension._compatibilityMode == otherInfo.Extension._compatibilityMode; -#endif } } } diff --git a/tests/EntityFrameworkCore.Projectables.FunctionalTests/NullConditionals/IngoreNullConditionalRewriteTests.cs b/tests/EntityFrameworkCore.Projectables.FunctionalTests/NullConditionals/IngoreNullConditionalRewriteTests.cs index c14b123..44e48d5 100644 --- a/tests/EntityFrameworkCore.Projectables.FunctionalTests/NullConditionals/IngoreNullConditionalRewriteTests.cs +++ b/tests/EntityFrameworkCore.Projectables.FunctionalTests/NullConditionals/IngoreNullConditionalRewriteTests.cs @@ -34,7 +34,6 @@ namespace EntityFrameworkCore.Projectables.FunctionalTests.NullConditionals return Verifier.Verify(query.ToQueryString()); } -#if EFPROJECTABLES2 [Fact] public Task RelationalExpression() { @@ -45,6 +44,5 @@ namespace EntityFrameworkCore.Projectables.FunctionalTests.NullConditionals return Verifier.Verify(query.ToQueryString()); } -#endif } } diff --git a/tests/EntityFrameworkCore.Projectables.FunctionalTests/NullConditionals/RewriteNullConditionalRewriteTests.cs b/tests/EntityFrameworkCore.Projectables.FunctionalTests/NullConditionals/RewriteNullConditionalRewriteTests.cs index abf8b9c..9acdbfa 100644 --- a/tests/EntityFrameworkCore.Projectables.FunctionalTests/NullConditionals/RewriteNullConditionalRewriteTests.cs +++ b/tests/EntityFrameworkCore.Projectables.FunctionalTests/NullConditionals/RewriteNullConditionalRewriteTests.cs @@ -34,7 +34,6 @@ namespace EntityFrameworkCore.Projectables.FunctionalTests.NullConditionals return Verifier.Verify(query.ToQueryString()); } -#if EFPROJECTABLES2 [Fact] public Task RelationalExpression() { @@ -45,6 +44,5 @@ namespace EntityFrameworkCore.Projectables.FunctionalTests.NullConditionals return Verifier.Verify(query.ToQueryString()); } -#endif } }