artiomchi / FlexLabs.Upsert

FlexLabs.Upsert is a library that brings UPSERT functionality to common database providers for Entity Framework in their respective native SQL syntax
MIT License
516 stars 81 forks source link

Plan to upgrade to .NET 7 ? #129

Closed odinnou closed 1 year ago

odinnou commented 1 year ago

Hi! Thank you for this incredible library, it helps me a lot!

Do you have any plan to upgrade it to future .NET 7?

Thanks in advance.

KayakFisher205 commented 1 year ago

I had been running the current version of Upsert on Net Core 7 with no issues until the release of dotnet-sdk-7.0.100-rc.1.22431.12-win-x64. I noticed it was failing for Method Not found. I downloaded the source, checked Include prereleases in the Nuget Solution, updating everything, and a clean build. Using the new DLL it worked. I'm sure once the Net core 7 final is released, Upsert will be updated. Since it worked then was broken is why most developers won't even start until a stable release has been tested.

mo3in commented 1 year ago

@KayakFisher205 .NET 7 is now RC version, that's meaning there is no breaking change anymore.

currently error at .NET 7:

System.MissingMethodException: Method not found: 'System.Data.Common.DbParameter Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping.CreateParameter(System.Data.Common.Db
Command, System.String, System.Object, System.Nullable`1<Boolean>)'.
mookid8000 commented 1 year ago

This error can be fixed simply by targeting .NET 7 and compiling against EF 7. I submitted a fix in #134

lol987lol commented 1 year ago

@mookid8000 Thx for the solution! I faced the same problem. I hope your PR is merged soon :D @artiomchi JustDoIt

This error can be fixed simply by targeting .NET 7 and compiling against EF 7. I submitted a fix in #134

rsr-maersk commented 1 year ago

Are there any breaking changes between 6 and 7? Otherwise, we could get the package to support both frameworks

artiomchi commented 1 year ago

The package does support both, just on different major versions.. At the moment I'll maintain both versions, since not everyone will move to .NET 7 :)

I've released a pre-release build to NuGet yesterday, so it can be used already.. if there are no bug reports from users, I'll promote it to a production version

https://www.nuget.org/packages/FlexLabs.EntityFrameworkCore.Upsert

MarcoMedrano commented 1 year ago

@artiomchi Thanks for the support!! Just linking your version that works with .NET 7 https://www.nuget.org/packages/FlexLabs.EntityFrameworkCore.Upsert/7.0.0-beta.1 Or simple

dotnet add package FlexLabs.EntityFrameworkCore.Upsert --version 7.0.0-beta.1
alitas commented 1 year ago

The package does support both, just on different major versions.. At the moment I'll maintain both versions, since not everyone will move to .NET 7 :)

I've released a pre-release build to NuGet yesterday, so it can be used already.. if there are no bug reports from users, I'll promote it to a production version

nuget.org/packages/FlexLabs.EntityFrameworkCore.Upsert

EF7 does support .NET 6, so I believe it would be better if this project did the same as well in its 7.0 version. Right now, a .NET 6 project using EF7 can't use FlexLabs.EntityFrameworkCore.Upsert 7.0 because of the framework dependency, but it also can't use FlexLabs.EntityFrameworkCore.Upsert 6.0 because it will throw System.MissingMethodException.

artiomchi commented 1 year ago

@alitas whoop, you're absolutely right - I definitely missed that! I made the wrong assumption that EF7 also required .NET 7

I just pushed a beta.2 build that targets .NET 6 instead!

Thanks for pointing it out!

artiomchi commented 1 year ago

Thanks for confirming that it works to everyone! Version 7.0.0 is now released: https://www.nuget.org/packages/FlexLabs.EntityFrameworkCore.Upsert/7.0.0