Skip to content

Commit d0f954d

Browse files
authored
Merge pull request #14 from yv989c/feature/ef7-support
Feature/ef7 support
2 parents e454d5f + a168783 commit d0f954d

File tree

10 files changed

+75
-2
lines changed

10 files changed

+75
-2
lines changed

BlazarTech.QueryableValues.sln

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
2626
Version.xml = Version.xml
2727
EndProjectSection
2828
EndProject
29+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "QueryableValues.SqlServer.EFCore7", "src\QueryableValues.SqlServer.EFCore7\QueryableValues.SqlServer.EFCore7.csproj", "{F8551409-EE9D-4E16-B62B-80926E370AB2}"
30+
EndProject
31+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "QueryableValues.SqlServer.Tests.EFCore7", "tests\QueryableValues.SqlServer.Tests.EFCore7\QueryableValues.SqlServer.Tests.EFCore7.csproj", "{D5293D2F-4649-4A2B-A50D-E7DBD4AA4A5C}"
32+
EndProject
2933
Global
3034
GlobalSection(SolutionConfigurationPlatforms) = preSolution
3135
Debug|Any CPU = Debug|Any CPU
@@ -90,6 +94,22 @@ Global
9094
{E6587114-CE45-4D9B-9235-3CBD5B7228B0}.Test_All|Any CPU.Build.0 = Test_All|Any CPU
9195
{E6587114-CE45-4D9B-9235-3CBD5B7228B0}.Test|Any CPU.ActiveCfg = Test|Any CPU
9296
{E6587114-CE45-4D9B-9235-3CBD5B7228B0}.Test|Any CPU.Build.0 = Test|Any CPU
97+
{F8551409-EE9D-4E16-B62B-80926E370AB2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
98+
{F8551409-EE9D-4E16-B62B-80926E370AB2}.Debug|Any CPU.Build.0 = Debug|Any CPU
99+
{F8551409-EE9D-4E16-B62B-80926E370AB2}.Release|Any CPU.ActiveCfg = Release|Any CPU
100+
{F8551409-EE9D-4E16-B62B-80926E370AB2}.Release|Any CPU.Build.0 = Release|Any CPU
101+
{F8551409-EE9D-4E16-B62B-80926E370AB2}.Test_All|Any CPU.ActiveCfg = Test|Any CPU
102+
{F8551409-EE9D-4E16-B62B-80926E370AB2}.Test_All|Any CPU.Build.0 = Test|Any CPU
103+
{F8551409-EE9D-4E16-B62B-80926E370AB2}.Test|Any CPU.ActiveCfg = Test|Any CPU
104+
{F8551409-EE9D-4E16-B62B-80926E370AB2}.Test|Any CPU.Build.0 = Test|Any CPU
105+
{D5293D2F-4649-4A2B-A50D-E7DBD4AA4A5C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
106+
{D5293D2F-4649-4A2B-A50D-E7DBD4AA4A5C}.Debug|Any CPU.Build.0 = Debug|Any CPU
107+
{D5293D2F-4649-4A2B-A50D-E7DBD4AA4A5C}.Release|Any CPU.ActiveCfg = Release|Any CPU
108+
{D5293D2F-4649-4A2B-A50D-E7DBD4AA4A5C}.Release|Any CPU.Build.0 = Release|Any CPU
109+
{D5293D2F-4649-4A2B-A50D-E7DBD4AA4A5C}.Test_All|Any CPU.ActiveCfg = Test_All|Any CPU
110+
{D5293D2F-4649-4A2B-A50D-E7DBD4AA4A5C}.Test_All|Any CPU.Build.0 = Test_All|Any CPU
111+
{D5293D2F-4649-4A2B-A50D-E7DBD4AA4A5C}.Test|Any CPU.ActiveCfg = Test|Any CPU
112+
{D5293D2F-4649-4A2B-A50D-E7DBD4AA4A5C}.Test|Any CPU.Build.0 = Test|Any CPU
93113
EndGlobalSection
94114
GlobalSection(SolutionProperties) = preSolution
95115
HideSolutionNode = FALSE

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ If you feel that this solution has provided you some value, please consider [buy
3131

3232
Your ⭐ on [this repository][Repository] also helps! Thanks! 🖖🙂
3333

34+
> 💡 Still on Entity Framework 6 (non-core)?
35+
> [This Stack Overflow answer](https://stackoverflow.com/a/70587979/2206145) may be helpful.
36+
3437
# Getting Started
3538

3639
## Installation
@@ -43,6 +46,7 @@ EF Core | Command
4346
3.x | `Install-Package BlazarTech.QueryableValues.SqlServer -Version 3.4.0`
4447
5.x | `Install-Package BlazarTech.QueryableValues.SqlServer -Version 5.4.0`
4548
6.x | `Install-Package BlazarTech.QueryableValues.SqlServer -Version 6.4.0`
49+
7.x | `Install-Package BlazarTech.QueryableValues.SqlServer -Version 7.0.0-preview.1`
4650

4751
## Configuration
4852
Look for the place in your code where you are setting up your [DbContext] and calling the [UseSqlServer] extension method, then use a lambda expression to access the `SqlServerDbContextOptionsBuilder` provided by it. It is on this builder that you must call the `UseQueryableValues` extension method as shown in the following simplified examples:

Version.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@
33
<VersionEFCore3>3.4.0</VersionEFCore3>
44
<VersionEFCore5>5.4.0</VersionEFCore5>
55
<VersionEFCore6>6.4.0</VersionEFCore6>
6+
<VersionEFCore7>7.0.0-preview.1</VersionEFCore7>
67
</PropertyGroup>
78
</Project>

docs/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ If you feel that this solution has provided you some value, please consider [buy
2727

2828
Your ⭐ on [this repository][Repository] also helps! Thanks! 🖖🙂
2929

30+
> 💡 Still on Entity Framework 6 (non-core)?
31+
> [This Stack Overflow answer](https://stackoverflow.com/a/70587979/2206145) may be helpful.
32+
3033
# Getting Started
3134

3235
## Installation
@@ -39,6 +42,7 @@ EF Core | Command
3942
3.x | `Install-Package BlazarTech.QueryableValues.SqlServer -Version 3.4.0`
4043
5.x | `Install-Package BlazarTech.QueryableValues.SqlServer -Version 5.4.0`
4144
6.x | `Install-Package BlazarTech.QueryableValues.SqlServer -Version 6.4.0`
45+
7.x | `Install-Package BlazarTech.QueryableValues.SqlServer -Version 7.0.0-preview.1`
4246

4347
## Configuration
4448
Look for the place in your code where you are setting up your [DbContext] and calling the [UseSqlServer] extension method, then use a lambda expression to access the `SqlServerDbContextOptionsBuilder` provided by it. It is on this builder that you must call the `UseQueryableValues` extension method as shown in the following simplified examples:

src/QueryableValues.SqlServer.EFCore6/QueryableValues.SqlServer.EFCore6.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@
1010
</PropertyGroup>
1111

1212
<ItemGroup>
13-
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0" />
13+
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="[6.0,7.0)" />
1414
</ItemGroup>
1515
</Project>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
<Import Project="../SharedProjectProperties.xml" />
3+
<Import Project="../../Version.xml" />
4+
5+
<PropertyGroup>
6+
<VersionPrefix>$(VersionEFCore7)</VersionPrefix>
7+
<TargetFramework>net6.0</TargetFramework>
8+
<Configurations>Debug;Release;Test</Configurations>
9+
<DefineConstants>$(DefineConstants);EFCORE;EFCORE7</DefineConstants>
10+
</PropertyGroup>
11+
12+
<ItemGroup>
13+
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="7.0.0-preview.6.22329.4" />
14+
</ItemGroup>
15+
</Project>

src/QueryableValues.SqlServer/QueryableValuesSqlServerExtension.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public override void PopulateDebugInfo(IDictionary<string, string> debugInfo)
8080
{
8181
}
8282

83-
#if EFCORE6
83+
#if EFCORE6 || EFCORE7
8484
public override int GetServiceProviderHashCode() => 0;
8585
public override bool ShouldUseSameServiceProvider(DbContextOptionsExtensionInfo other) => true;
8686
#else

src/SharedProjectProperties.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,5 +57,6 @@
5757
<InternalsVisibleTo Include="BlazarTech.QueryableValues.SqlServer.Tests.EFCore3" />
5858
<InternalsVisibleTo Include="BlazarTech.QueryableValues.SqlServer.Tests.EFCore5" />
5959
<InternalsVisibleTo Include="BlazarTech.QueryableValues.SqlServer.Tests.EFCore6" />
60+
<InternalsVisibleTo Include="BlazarTech.QueryableValues.SqlServer.Tests.EFCore7" />
6061
</ItemGroup>
6162
</Project>
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
<Import Project="../SharedTestProjectProperties.xml" />
3+
4+
<PropertyGroup>
5+
<AssemblyName>BlazarTech.QueryableValues.SqlServer.Tests.EFCore7</AssemblyName>
6+
<DefineConstants>$(DefineConstants);TESTS;EFCORE7</DefineConstants>
7+
</PropertyGroup>
8+
9+
<ItemGroup>
10+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0" />
11+
<PackageReference Include="xunit" Version="2.4.1" />
12+
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
13+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
14+
<PrivateAssets>all</PrivateAssets>
15+
</PackageReference>
16+
<PackageReference Include="coverlet.collector" Version="3.1.0">
17+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
18+
<PrivateAssets>all</PrivateAssets>
19+
</PackageReference>
20+
</ItemGroup>
21+
22+
<ItemGroup>
23+
<ProjectReference Include="..\..\src\QueryableValues.SqlServer.EFCore7\QueryableValues.SqlServer.EFCore7.csproj" />
24+
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="7.0.0-preview.6.22329.4" />
25+
</ItemGroup>
26+
</Project>

tests/QueryableValues.SqlServer.Tests/Integration/MyDbContext.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ internal static class DatabaseName
99
public const string Name = "QueryableValuesTestsEFCore5";
1010
#elif EFCORE6
1111
public const string Name = "QueryableValuesTestsEFCore6";
12+
#elif EFCORE7
13+
public const string Name = "QueryableValuesTestsEFCore7";
1214
#endif
1315
}
1416

0 commit comments

Comments
 (0)