Entity Framework Extensions EF Extensions for EF Core 7 - What is New?
EF Core 7 was finally released on November 8, 2022, along with some new features and confusion.
Entity Framework Extensions officially start to support EF Core 7 starting from v18.104.22.168
If you are confused with our versioning, please refer to EFCore-Pinned Versioning convention.
EF Core 7 and Bulk Insert
- Major IncludeGraph revamp (better performance with less memory usage) (v7.100.0)
- Added QueryHint option for SQL Server (v7.21.1)
- Removed Newtonsoft.Json dependency (v7.20.0)
- Performance Improvement for
- Added support to TPC (v7.18.1)
- Added support to entity type with nullable owned types (v7.17.0)
And many more.
Even with all those improvements, we always make sure that our library stays easy to use for everyone:
// Easy to use context.BulkInsert(customers); // Easy to customize context.BulkInsert(invoices, options => options.IncludeGraph = true);
EF Core 7 now supports Bulk Update and Bulk Delete, oh really?
EF Core 7 added A LOT of confusion by marketing their newly ExecuteUpdate and ExecuteDelete as being a
BulkDelete which is not. Even their documentation doesn't mention the word
But what exactly do these two new methods do?
ExecuteUpdateis similar to our UpdateFromQuery method that allows to update rows directly in the database using a query.
ExecuteDeleteis similar to our DeleteFromQuery method that allows to delete rows directly in the database using a query.
You can feel free to use either our method or Microsoft method to achieve this behavior. While being very similar, they have a few differences, such as the way they specify property values to update.
- BulkUpdate: Update in bulk all rows that match your entities list (so every entity can have different values).
- BulkDelete: Delete in bulk all rows that match your entities list.
So be careful when seeing that EF Core supports bulk operations, as a lot of articles and videos will use those big SEO keywords, adding even more confusion.
EF Core 7 is a big success for the Microsoft Team. They worked hard indeed to add support for
TPC (Table Per Hierarchy), which we believe was the hardest inheritance to add and to improve the performance overall. The only negative point was to promote their 2 new methods as
As for ZZZ Projects, making sure that Entity Framework Extensions support EF Core 7 was also a big challenge as we kept learning new features that we were not even aware were supported. However, our library is improving daily, making it the most advanced and customizable library for bulk operations.