mirror of
https://github.com/fergalmoran/EFCore.NamingConventions.git
synced 2025-12-22 09:38:21 +00:00
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:
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
@@ -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
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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"]
|
||||
|
||||
Reference in New Issue
Block a user