mirror of
https://github.com/zoriya/EntityFrameworkCore.Projectables.git
synced 2025-12-06 05:56:10 +00:00
Removed V1 support
This commit is contained in:
17
.github/workflows/build.yml
vendored
17
.github/workflows/build.yml
vendored
@@ -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
|
||||
|
||||
@@ -20,28 +20,11 @@
|
||||
<Description>Project over properties and functions in your linq queries</Description>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition=" '$(Configuration)' == 'DebugV1' Or '$(Configuration)' == 'ReleaseV1' ">
|
||||
<EFProjectablesVersion>1</EFProjectablesVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition=" '$(EFProjectablesVersion)' == '' ">
|
||||
<EFProjectablesVersion>2</EFProjectablesVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<MicrosoftCodeAnalysisVersion>3.11.0</MicrosoftCodeAnalysisVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition=" $(EFProjectablesVersion) == 1 ">
|
||||
<DefineConstants>EFPROJECTABLES1</DefineConstants>
|
||||
<TargetFrameworkVersion>netstandard2.0</TargetFrameworkVersion>
|
||||
<MicrosoftExtensionsVersion>3.1.0</MicrosoftExtensionsVersion>
|
||||
<EFCoreVersion>3.1.0</EFCoreVersion>
|
||||
<!-- We're testing against EF Core 5 as its compatible with 3.1.0 and contains additional features -->
|
||||
<TestEFCoreVersion>5.0.10</TestEFCoreVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition=" $(EFProjectablesVersion) == 2 ">
|
||||
<PropertyGroup>
|
||||
<DefineConstants>EFPROJECTABLES2</DefineConstants>
|
||||
<TargetFrameworkVersion>net6.0</TargetFrameworkVersion>
|
||||
<MicrosoftExtensionsVersion>6.0.0</MicrosoftExtensionsVersion>
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user