diff --git a/.github/workflows/dotnet-core.yml b/.github/workflows/dotnet.yml
similarity index 53%
rename from .github/workflows/dotnet-core.yml
rename to .github/workflows/dotnet.yml
index 37e1f77..31607fa 100644
--- a/.github/workflows/dotnet-core.yml
+++ b/.github/workflows/dotnet.yml
@@ -1,4 +1,4 @@
-name: .NET Core
+name: .NET
on:
push:
@@ -13,13 +13,13 @@ jobs:
steps:
- uses: actions/checkout@v2
- - name: Setup .NET Core
+ - name: Setup .NET
uses: actions/setup-dotnet@v1
with:
- dotnet-version: 5.0.100-rc.2.20479.15
- - name: Install dependencies
+ dotnet-version: 6.0.x
+ - name: Restore dependencies
run: dotnet restore
- name: Build
- run: dotnet build --configuration Release --no-restore
+ run: dotnet build --no-restore
- name: Test
- run: dotnet test --no-restore --verbosity normal
+ run: dotnet test --no-build --verbosity normal
diff --git a/EFCore.ConfigurationManager.Tests/EFCore.ConfigurationManager.Tests.csproj b/EFCore.ConfigurationManager.Tests/EFCore.ConfigurationManager.Tests.csproj
index 48e0565..cf2162d 100644
--- a/EFCore.ConfigurationManager.Tests/EFCore.ConfigurationManager.Tests.csproj
+++ b/EFCore.ConfigurationManager.Tests/EFCore.ConfigurationManager.Tests.csproj
@@ -2,23 +2,20 @@
- net5.0
+ net6.0
EntityFrameworkCore.ConfigurationManager
EntityFrameworkCore.ConfigurationManager.Tests
false
- 8.0
true
..\key.snk
-
-
+
all
-
-
-
+
+
runtime; build; native; contentfiles; analyzers; buildtransitive
diff --git a/EFCore.ConfigurationManager/ConfigurationManagerDbContextOptionsExtension.cs b/EFCore.ConfigurationManager/ConfigurationManagerDbContextOptionsExtension.cs
index 7349549..02c869c 100644
--- a/EFCore.ConfigurationManager/ConfigurationManagerDbContextOptionsExtension.cs
+++ b/EFCore.ConfigurationManager/ConfigurationManagerDbContextOptionsExtension.cs
@@ -46,11 +46,14 @@ public override bool IsDatabaseProvider
public override string LogFragment
=> "using ConfigurationManager ";
- public override long GetServiceProviderHashCode()
+ public override int GetServiceProviderHashCode()
=> 0;
public override void PopulateDebugInfo(IDictionary debugInfo)
=> debugInfo["ConfigurationManager"] = "1";
+
+ public override bool ShouldUseSameServiceProvider(DbContextOptionsExtensionInfo other)
+ => other is ExtensionInfo;
}
}
}
diff --git a/EFCore.ConfigurationManager/ConfigurationManagerServiceCollectionExtensions.cs b/EFCore.ConfigurationManager/ConfigurationManagerServiceCollectionExtensions.cs
index 4690c01..66b6dc3 100644
--- a/EFCore.ConfigurationManager/ConfigurationManagerServiceCollectionExtensions.cs
+++ b/EFCore.ConfigurationManager/ConfigurationManagerServiceCollectionExtensions.cs
@@ -19,8 +19,7 @@ public static class ConfigurationManagerServiceCollectionExtensions
public static IServiceCollection AddEntityFrameworkConfigurationManager(this IServiceCollection serviceCollection)
{
new EntityFrameworkRelationalServicesBuilder(serviceCollection)
- .TryAddProviderSpecificServices(
- x => x.TryAddScoped());
+ .TryAdd();
return serviceCollection;
}
diff --git a/EFCore.ConfigurationManager/EFCore.ConfigurationManager.csproj b/EFCore.ConfigurationManager/EFCore.ConfigurationManager.csproj
index 18747d7..e5a018b 100644
--- a/EFCore.ConfigurationManager/EFCore.ConfigurationManager.csproj
+++ b/EFCore.ConfigurationManager/EFCore.ConfigurationManager.csproj
@@ -1,7 +1,7 @@
- netstandard2.0
+ net6.0
EntityFrameworkCore.ConfigurationManager
EntityFrameworkCore.ConfigurationManager
Brice Lambson
@@ -10,19 +10,19 @@
EFCore;Config
https://github.com/efcore/EFCore.ConfigurationManager.git
git
- © 2020 Brice Lambson. All rights reserved.
+ © 2021 Brice Lambson. All rights reserved.
true
..\key.snk
true
true
- 8.0
MIT
https://github.com/efcore/EFCore.ConfigurationManager/releases
+ 2.0.0
-
-
+
+
diff --git a/README.md b/README.md
index 6751127..3627f3c 100644
--- a/README.md
+++ b/README.md
@@ -14,6 +14,17 @@ The latest stable version is available on [NuGet](https://www.nuget.org/packages
dotnet add package EntityFrameworkCore.ConfigurationManager
```
+Compatibility
+-------------
+
+The following table shows which version of this library to use with which version of EF Core.
+
+EF Core | Version to use
+------- | --------------
+6.0 | 2.x
+5.0 | 1.x
+3.1 | 1.x
+
Usage
-----