Upgrade to RC1 (#93)

* Changed versions and implemented methods
* Changed C# version to 10.0 and replaced CreateConventionSetBuilder method
* Upgrade the version of fotnet in build workflow
* Fix dotnet version again in build workflow
This commit is contained in:
Zvonimir Matić
2021-09-26 18:21:02 +02:00
committed by GitHub
parent 5f3e65ebe8
commit 1bc13f8daa
6 changed files with 16 additions and 7 deletions

View File

@@ -13,7 +13,7 @@ jobs:
- name: Setup .NET Core SDK
uses: actions/setup-dotnet@v1.8.2
with:
dotnet-version: '6.0.100-preview.3.21202.5'
dotnet-version: '6.0.100-rc.1.21463.6'
- name: Test
run: dotnet test

View File

@@ -3,7 +3,7 @@
<AnalysisLevel>latest</AnalysisLevel>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<LangVersion>9.0</LangVersion>
<LangVersion>10.0</LangVersion>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
</PropertyGroup>
</Project>

View File

@@ -1,7 +1,7 @@
<Project>
<PropertyGroup>
<EFCoreVersion>6.0.0-preview.3.21201.2</EFCoreVersion>
<MicrosoftExtensionsVersion>6.0.0-preview.3.21201.4</MicrosoftExtensionsVersion>
<EFCoreVersion>6.0.0-rc.1.21452.10</EFCoreVersion>
<MicrosoftExtensionsVersion>6.0.0-rc.1.21451.13</MicrosoftExtensionsVersion>
</PropertyGroup>
<ItemGroup>

View File

@@ -9,7 +9,9 @@ using System.Linq;
using EFCore.NamingConventions.Internal;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Metadata.Conventions.Infrastructure;
using Microsoft.EntityFrameworkCore.TestUtilities;
using Microsoft.Extensions.DependencyInjection;
using Xunit;
namespace EFCore.NamingConventions.Test
@@ -407,7 +409,11 @@ namespace EFCore.NamingConventions.Test
private IModel BuildModel(Action<ModelBuilder> builderAction, CultureInfo culture = null)
{
var conventionSet = SqliteTestHelpers.Instance.CreateConventionSetBuilder().CreateConventionSet();
var conventionSet = SqliteTestHelpers
.Instance
.CreateContextServices()
.GetRequiredService<IConventionSetBuilder>()
.CreateConventionSet();
var optionsBuilder = new DbContextOptionsBuilder();
SqliteTestHelpers.Instance.UseProviderOptions(optionsBuilder);

View File

@@ -2,7 +2,7 @@
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<VersionPrefix>6.0.0-preview.3</VersionPrefix>
<VersionPrefix>6.0.0-rc.1</VersionPrefix>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>../EFCore.NamingConventions.snk</AssemblyOriginatorKeyFile>

View File

@@ -124,13 +124,16 @@ namespace EFCore.NamingConventions.Internal
}
}
public override long GetServiceProviderHashCode()
public override int GetServiceProviderHashCode()
{
var hashCode = Extension._namingConvention.GetHashCode();
hashCode = (hashCode * 3) ^ (Extension._culture?.GetHashCode() ?? 0);
return hashCode;
}
public override bool ShouldUseSameServiceProvider(DbContextOptionsExtensionInfo other)
=> true;
public override void PopulateDebugInfo(IDictionary<string, string> debugInfo)
{
debugInfo["Naming:UseNamingConvention"]