Entity Framework Bulk Update Discover who support this features
BulkUpdate allows you to improve EF performance by updating multiple entities with bulk operations.
For HUGE performance gains, Entity Framework makes one database round-trip for each entity to update.
So if you want to modify 10,000 entities, 10,000 database round trip will be required which is INSANELY slow. To use BulkUpdate, you will need to use a third-party library.
|Operations||1,000 Entities||2,000 Entities||5,000 Entities|
|BulkUpdate||50 ms||55 ms||65 ms|
|SaveChanges||1,000 ms||2,000 ms||5,000 ms|
Google Related Searches
- Entity Framework Insert Multiple Records
- Entity Framework Insert Multiple Rows
- Entity Framework Add Range
StackOverflow Related Questions
- WebAPI EF update 30,000 rows of data is very slow
- EF 6 performance while updating multiple records with different values in same table
- Properly and efficiently update hundreds of records in sql server db table from .net c# application loop
// using Z.EntityFramework.Extensions; // Don't forget to include this. // Easy to use context.BulkUpdate(list); // Easy to customize context.BulkUpdate(list, bulk => bulk.BatchSize = 100);
|Z.EntityFramework.Extensions||PRO||EF6||< 1 Day||Yes||Bulk SaveChanges