zejji / DbContextScopeEFCore

A version of Mehdi El Gueddari's DbContextScope library updated for EF Core with a number of improvements and bug fixes
9 stars 2 forks source link

Make EF Core 6 build available in NuGet #93

Closed StevePy closed 1 year ago

StevePy commented 1 year ago

Would it be possible to update the NuGet package to expose both the EF Core 6 and 7 versions of DbContextScope? I have an existing project stable on .Net 6 and EF Core 6 and went to set up a new dev box but the v6 supporting NuGet package is no longer being offered by NuGet. EF Core 6 is still under support so ideally this package should still be available. I will be upgrading to Core 8 early next year. For now I'll need to try and scavenge a package off an existing development machine.

Edit: Just thought to check and EF7 is compatible with .Net Core 6 so this is a non-disruptive upgrade for this project. Still consider ensuring the NuGet package supports LS support versions for EF.

zejji commented 1 year ago

Hi @StevePy,

You should still be able to access the EF Core 6 version of the package at Zejji.DbContextScope.EFCore6. The only version of that package that should be unlisted was a superseded preview version.

I've also added a note to the NuGet README for Zejji.DbContextScope.EFCore6 to make clear that, for EF Core 7 onwards, the package will be called Zejji.DbContextScope.EFCore, so that it is not necessary to change the package name for each new version of EF Core.

I'll also update the Zejji.DbContextScope.EFCore README to include a mention of the old Zejji.DbContextScope.EFCore6 package, but this will need to wait for the next version release as the README is now referenced directly in the .csproj file.

StevePy commented 1 year ago

Hi Zejji, Yes, I was just updating an existing project references and saw that the EFCore 6 references were a DbContextScope.EFCore6.. Not sure why that package didn't seem to show that package when I had done a search for DbContextScope. All good, thanks!

StevePy commented 1 year ago

Oof, one issue you might consider. EFCore supports .Net Core 6 and 7, however DbContextScope.EFCore only supports .Net Core 7. Can this be made fully compatible with EF Core 7 dependencies?

zejji commented 1 year ago

Thanks for the heads-up - yes, the TargetFramework should indeed match the EF Core TargetFramework. I'll update this in the coming version.

zejji commented 1 year ago

Version 7.0.5 is now released and targets net6.0. The automated tests also are now run on both .NET 6 and .NET 7.