Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Hold off on upgrading to .Net Core 3.0 Version Due To Entity Framework Issues. #8033


User avatar
0
rickfrankel created

All,

After upgrading to .Net Core 3.0 version yesterday I have to say that Entity Framework for .Net Core 3.0 is not ready and I'd advise holding off on upgrading.

Here are a few of the issues I've encountered with my upgrade.

https://github.com/aspnet/EntityFrameworkCore/issues/18090 https://github.com/aspnet/EntityFrameworkCore/issues/18510

They are really basic issues that appear to be fixed in pre-release versions.

I have managed to fix it up by upgrading the Host project to the pre-release Entity Framwork Core version but it's not a great solution.

It looks like everyone is holding off at the moment for 3.1 of the Entity Framework Core version.

If anyone else has better lucky would love to hear it.

Be great to see if Abp an upgrade to a pre-release version to get around these issues.

Cheers Rick


2 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team

    Overall, EF Core 3.0 has met production requirements. Of course it may have some minor problems, but it does modify and improve a lot of problems with EF 2.X.

    I suggest you upgrade NET CORE + EF CORE 3.X.

  • User Avatar
    0
    rickfrankel created

    I agree you can upgrade, just wanted people to know that it broke lots of my code.

    The workaround is to install entityframework pre-release nuget packges into the web.host project.

    I don't use a lot of automapper and make use of a lot of LINQ to map to my models.

    Eg lots of this style of code.

    repo.GetAll() .Include( => .SomeFK) .Where( => .Name == "Name") .Select( => new ModelIWantToReturn { Prop1 = _.Name, Prop2 = _.Description Prop3 = _.SomeFk.Any(x => x.IsActive) );

    That kind of code above pretty much broken in EF Core 3.0 and you need the pre-release version to make it work again.

    I had about 3 or 4 failures that worked in EF 2.0 that broke in EF Core 3.0 and worked straight away once I got the pre-release version in.

    So it was more a warning to people who have bigger projects than I. If you have lots of LINQ style code be prepared it may not work in EF Core 3.0 without the 3.1 pre-release.

    Thanks