mirror of
https://github.com/fergalmoran/EFCore.NamingConventions.git
synced 2026-01-04 16:04:01 +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
|
- name: Setup .NET Core SDK
|
||||||
uses: actions/setup-dotnet@v1.8.2
|
uses: actions/setup-dotnet@v1.8.2
|
||||||
with:
|
with:
|
||||||
dotnet-version: '6.0.100-preview.3.21202.5'
|
dotnet-version: '6.0.100-rc.1.21463.6'
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
run: dotnet test
|
run: dotnet test
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<AnalysisLevel>latest</AnalysisLevel>
|
<AnalysisLevel>latest</AnalysisLevel>
|
||||||
<IncludeSymbols>true</IncludeSymbols>
|
<IncludeSymbols>true</IncludeSymbols>
|
||||||
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
|
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
|
||||||
<LangVersion>9.0</LangVersion>
|
<LangVersion>10.0</LangVersion>
|
||||||
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
|
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<Project>
|
<Project>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<EFCoreVersion>6.0.0-preview.3.21201.2</EFCoreVersion>
|
<EFCoreVersion>6.0.0-rc.1.21452.10</EFCoreVersion>
|
||||||
<MicrosoftExtensionsVersion>6.0.0-preview.3.21201.4</MicrosoftExtensionsVersion>
|
<MicrosoftExtensionsVersion>6.0.0-rc.1.21451.13</MicrosoftExtensionsVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -9,7 +9,9 @@ using System.Linq;
|
|||||||
using EFCore.NamingConventions.Internal;
|
using EFCore.NamingConventions.Internal;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using Microsoft.EntityFrameworkCore.Metadata;
|
using Microsoft.EntityFrameworkCore.Metadata;
|
||||||
|
using Microsoft.EntityFrameworkCore.Metadata.Conventions.Infrastructure;
|
||||||
using Microsoft.EntityFrameworkCore.TestUtilities;
|
using Microsoft.EntityFrameworkCore.TestUtilities;
|
||||||
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
using Xunit;
|
using Xunit;
|
||||||
|
|
||||||
namespace EFCore.NamingConventions.Test
|
namespace EFCore.NamingConventions.Test
|
||||||
@@ -407,7 +409,11 @@ namespace EFCore.NamingConventions.Test
|
|||||||
|
|
||||||
private IModel BuildModel(Action<ModelBuilder> builderAction, CultureInfo culture = null)
|
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();
|
var optionsBuilder = new DbContextOptionsBuilder();
|
||||||
SqliteTestHelpers.Instance.UseProviderOptions(optionsBuilder);
|
SqliteTestHelpers.Instance.UseProviderOptions(optionsBuilder);
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net6.0</TargetFramework>
|
<TargetFramework>net6.0</TargetFramework>
|
||||||
<VersionPrefix>6.0.0-preview.3</VersionPrefix>
|
<VersionPrefix>6.0.0-rc.1</VersionPrefix>
|
||||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||||
<SignAssembly>true</SignAssembly>
|
<SignAssembly>true</SignAssembly>
|
||||||
<AssemblyOriginatorKeyFile>../EFCore.NamingConventions.snk</AssemblyOriginatorKeyFile>
|
<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();
|
var hashCode = Extension._namingConvention.GetHashCode();
|
||||||
hashCode = (hashCode * 3) ^ (Extension._culture?.GetHashCode() ?? 0);
|
hashCode = (hashCode * 3) ^ (Extension._culture?.GetHashCode() ?? 0);
|
||||||
return hashCode;
|
return hashCode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override bool ShouldUseSameServiceProvider(DbContextOptionsExtensionInfo other)
|
||||||
|
=> true;
|
||||||
|
|
||||||
public override void PopulateDebugInfo(IDictionary<string, string> debugInfo)
|
public override void PopulateDebugInfo(IDictionary<string, string> debugInfo)
|
||||||
{
|
{
|
||||||
debugInfo["Naming:UseNamingConvention"]
|
debugInfo["Naming:UseNamingConvention"]
|
||||||
|
|||||||
Reference in New Issue
Block a user