damienbod / AspNetCoreLocalization

Localization.SqlLocalizer & ASP.NET Core MVC Localization Examples
http://damienbod.com/2015/10/21/asp-net-5-mvc-6-localization/
MIT License
251 stars 101 forks source link

EF6 missmatch version with EF5 throws HasAlternateKey method does not exist #87

Open nehio opened 2 years ago

nehio commented 2 years ago

Hi,

We were trying to update our app to net6.0 and noticed that due to our app having EF 6.0 and your package beeing on 5.0 it causes an error to be thrown on the SqlStringLocalizerFactory.cs line 113.

As i understand it, simply having the packages to the same version should fix this issue. Could you provide a release for net6.0 ?

Thank you in advance

damienbod commented 2 years ago

@nehio sounds good, I'll do an update

daniel-jann commented 2 years ago

Updating our app to net6.0, we also get an exception on the HasAlternateKey, but on the OnModelCreating method:

System.MissingMethodException: Method not found: 'Microsoft.EntityFrameworkCore.Metadata.Builders.KeyBuilder Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder`1.HasAlternateKey(System.Linq.Expressions.Expression`1<System.Func\`2<!0,System.Object>>)'. at Localization.SqlLocalizer.DbStringLocalizer.LocalizationModelContext.OnModelCreating(ModelBuilder builder)

damienbod commented 2 years ago

I will test and release with .NET 6 and the latest EF Core

Thanks for reporting

nehio commented 2 years ago

HI there ! Any news on a timeline for an update for .net 6.0 ? Thank you in advance.