MikaelEliasson / EntityFramework.Utilities

Provides extensions for EntityFramework that doesn't exist out of the box like delete and update by query and bulk inserts
443 stars 176 forks source link

Convert to EF Core 3 (partially) #132

Closed miniyou closed 4 years ago

miniyou commented 4 years ago

This PR adds basic support for EF Core 3. Batch delete and update is unsupported, due to the new SQL generated by EF Core.

RudeySH commented 4 years ago

Batch delete and update is unsupported, due to the new SQL generated by EF Core.

Is it impossible in EF Core to implement it? Or is it unsupported because it's a lot of work to rewrite the existing code to make it work?

miniyou commented 4 years ago

It should absolutely be possible to get working, but as an initial step it's fine for us to get inserts only working. We're relying on this library in production, and this upgrade is necessary to unblock upgrading the rest of the code to EF Core 3 (it's blocking due to the EF Core change from System.Data.SqlClient to Microsoft.Data.SqlClient).

When we're not blocked on this, it's up to Mikael to decide whether it's worth the effort to add support for updates and deletes. Honestly, the bulk of that job would probably not be the implementation per se, but rather to ensure that it's safe in all corner cases.

MikaelEliasson commented 4 years ago

We will have to look at how easy the new query generation in EF Core 3 is to support. Hopefully it's possible to generate the queries needed instead of parsing them.

This branch is quite hidden and it's basically only we at Bokio that use it so far looking at the download stats.

https://www.nuget.org/packages/ME.EntityFramework.Utilities