GitPedia

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.

From zzzprojects·Updated June 12, 2026·View on GitHub·

Entity Framework Extensions is a library that dramatically improves EF performances by using bulk and batch operations. The project is written primarily in C#, first published in 2016. Key topics include: batch, bulk-inserts, bulk-operation, bulk-savechanges, c-sharp.

Latest release: 10.105.6.0
June 9, 2026View Changelog →

What's Entity Framework Extensions?

Entity Framework Extensions is a library that dramatically improves EF performances by using bulk and batch operations.

People using this library often report performance enhancement by 50x times and more!

Improve Entity Framework performance with Bulk SaveChanges and Bulk Operations

Solve Entity Framework performance issue when saving with high performance bulk operations and hundreds of flexibles feature.

  • BulkSaveChanges
  • BulkInsert
  • BulkUpdate
  • BulkDelete
  • BulkMerge
  • DeleteFromQuery
  • UpdateFromQuery
csharp
// @nuget: Z.EntityFramework.Extensions.EFCore using Z.EntityFramework.Extensions; var context = new CustomerContext(); // ... context code ... // Easy to use context.BulkSaveChanges(); // Easy to customize context.BulkSaveChanges(operation => operation.BatchSize = 1000);
csharp
// @nuget: Z.EntityFramework.Extensions.EFCore using Z.EntityFramework.Extensions; // Perform specific bulk operations context.BulkDelete(customers); context.BulkInsert(customers); context.BulkUpdate(customers); // Customize Primary Key context.BulkMerge(customers, operation => { operation.ColumnPrimaryKeyExpression = customer => customer.Code; });

📊 Benchmark Results

We provide extensive benchmarks to demonstrate the performance improvements of Entity Framework Extensions compared to EF Core.

You can explore results either by database provider or by operation:

🔹 Benchmarks by Provider (EF Core vs EF Extensions)

🔹 Benchmarks by Operation (EF Core vs EF Extensions)

📌 Each page includes detailed charts (execution time and memory usage) generated with BenchmarkDotNet across multiple scenarios.


Example Benchmark

Below is an example of a Bulk Insert benchmark on SQL Server, comparing EF Core SaveChanges vs Entity Framework Extensions BulkInsert.
Entity Framework Extensions executes the same operation many times faster while also using significantly less memory.

Benchmark EFCore vs EFE – SQL Server - Bulk Insert

Download

Entity Framework Core (EF Core)

<a href="https://www.nuget.org/packages/Z.EntityFramework.Extensions.EFCore/" target="_blank"><img src="https://zzzprojects.github.io/images/nuget/entity-framework-extensions-efcore-v.svg" alt="download" /></a>
<a href="https://www.nuget.org/packages/Z.EntityFramework.Extensions.EFCore/" target="_blank"><img src="https://zzzprojects.github.io/images/nuget/entity-framework-extensions-efcore-d.svg" alt="" /></a>

PM> Install-Package Z.EntityFramework.Extensions.EFCore

Entity Framework 6 (EF6)

<a href="https://www.nuget.org/packages/Z.EntityFramework.Extensions/" target="_blank"><img src="https://zzzprojects.github.io/images/nuget/entity-framework-extensions-v.svg" alt="download" /></a>
<a href="https://www.nuget.org/packages/Z.EntityFramework.Extensions/" target="_blank"><img src="https://zzzprojects.github.io/images/nuget/entity-framework-extensions-d.svg" alt="" /></a>

PM> Install-Package Z.EntityFramework.Extensions

Entity Framework 5 (EF5)

<a href="https://www.nuget.org/packages/Z.EntityFramework.Extensions.EF5/" target="_blank"><img src="https://zzzprojects.github.io/images/nuget/entity-framework-extensions-ef5-v.svg" alt="download" /></a>
<a href="https://www.nuget.org/packages/Z.EntityFramework.Extensions.EF5/" target="_blank"><img src="https://zzzprojects.github.io/images/nuget/entity-framework-extensions-ef5-d.svg" alt="" /></a>

PM> Install-Package Z.EntityFramework.Extensions.EF5

* PRO Version unlocked for the current month

BulkSaveChanges

Problem

You need to save hundreds or thousands of entities, but you are not satisfied with Entity Framework performance.

Solution

BulkSaveChanges is exactly like SaveChanges but performs way faster. It’s easy to use, you only need to replace “SaveChanges” by “BulkSaveChanges”, and you are done!

// @nuget: Z.EntityFramework.Extensions.EFCore
using Z.EntityFramework.Extensions;

// Upgrade SaveChanges performance with BulkSaveChanges
var context = new CustomerContext();
// ... context code ...

// Easy to use
context.BulkSaveChanges();

// Easy to customize
context.BulkSaveChanges(operation => operation.BatchSize = 1000);
Scalability

BulkSaveChanges is as fast as SaveChanges with one entity and quickly become 10-50x faster with hundreds and thousands of entities.

Bulk Operations

Problem

You need even more performance than BulkSaveChanges, save detached entities or save entities in a specific order.

Solution

Use bulk operations such as bulk insert, update, delete and merge which perform operations on specified entities and bypass the change tracker to increase performance.

csharp
// @nuget: Z.EntityFramework.Extensions.EFCore using Z.EntityFramework.Extensions; // Perform specific bulk operations on entities context.BulkDelete(customers); context.BulkInsert(customers); context.BulkUpdate(customers); context.BulkMerge(customers);
Maintainability

Bulk Operation directly uses the Entity Framework Model. Even if you change column name or change inheritance (TPC, TPH, TPT), Bulk Operation will continue to work as expected.

Custom Key

Problem

You need to perform an update, delete, or merge using a specific custom key like the custom code.

Solution

Specify your own key by customizing the operation.

csharp
// @nuget: Z.EntityFramework.Extensions.EFCore using Z.EntityFramework.Extensions; // Use flexible features such as specifying the primary key context.BulkMerge(customers, operation => { operation.ColumnPrimaryKeyExpression = customer => customer.Code; });
Flexibility

Bulk operations offer hundreds of customization such as BatchSize, Custom Key, Custom Mapping, etc.

PRO Version

PRO Version unlocked for the current month

FeaturesPRO Version
Bulk SaveChangesYes
Bulk InsertYes
Bulk UpdateYes
Bulk DeleteYes
Bulk MergeYes
DeleteFromQueryYes
UpdateFromQueryYes
Commercial LicenseYes
Royalty-FreeYes
Support & Upgrades (1 year)Yes
Learn more about the PRO Version

Contribute

The best way to contribute is by spreading the word about the library:

  • Blog it
  • Comment it
  • Star it
  • Share it

A HUGE THANKS for your help.

More Projects

To view all our free and paid projects, visit our website ZZZ Projects.

Contributors

Showing top 5 contributors by commit count.

View all contributors on GitHub →

This article is auto-generated from zzzprojects/EntityFramework-Extensions via the GitHub API.Last fetched: 6/14/2026