zzzprojects / EntityFramework-Extensions

Entity Framework Bulk Operations | Improve Entity Framework performance with Bulk SaveChanges, Insert, update, delete and merge for SQL Server, SQL Azure, SQL Compact, MySQL and SQLite.
https://entityframework-extensions.net
341 stars 56 forks source link

Support Microsoft.Data.SqlClient for BatchSaveChanges #590

Closed GebitMattias closed 6 days ago

GebitMattias commented 2 months ago

Description

EF6 got an official update to version 6.5 and with this suggests using the Microsoft.Data.SqlClient provider:

However the BatchSaveChanges() methods do not support this provider as discussed here #467. It returns this exception: Oops! The provider 'Microsoft.Data.SqlClient.SqlConnection' is not supported for 'BatchSaveChanges'. Uses 'BulkSaveChanges' instead.

We cannot change our code to BulkSaveChanges as suggested. Are there plans to update BatchSaveChanges to support Microsoft.Data.SqlClient?

JonathanMagnan commented 2 months ago

Hello @GebitMattias ,

Yes, there is some plan to support Microsoft.Data.SqlClient, but probably more at the end of next Month.

All the code needed to be compatible with Microsoft.Data.SqlClient is already coded at around 95% (We already support it for Dapper Plus and EF Core), so we are just waiting for an official stable version to get released.

The current v6.5 that was released on June 14 contains a critical bug, as shown on NuGet, so we are currently waiting for an official stable version before making it happen.

As said, I believe the support will be added at the end of August (if a stable version is release since this date)

Best Regards,

Jon

GebitMattias commented 2 months ago

Thanks for the quick reply. We were just testing out switching to Microsoft.Data.SqlClient and ran into the issue with EF Extensions before the EF package ones ;) Looking forward to the update!

JonathanMagnan commented 2 weeks ago

Hello @GebitMattias ,

The v8.103.2.0 has been finally released.

The support for Microsoft.Data.SqlClient for BatchSaveChanges should finally work.

Could you test it and let us know if everything is working as expected?

Best Regards,

Jon

GebitMattias commented 6 days ago

Hi @JonathanMagnan, thanks for the heads-up, but we are currently planning to skip the EF 6.5 upgrade and instead look into going straight to EF 7 or 8. I will let you know, if we do the EF6.5 instead. You can close this issue