Is there a non-commercial alternative to Z.EntityFramework.Extensions?

c# entity-framework-6 sql-delete sql-insert sql-update

Question

Entity Framework can be very slow on mass insert/update/delete operations. Even the often suggested tweaks to turn off AutoDetectChanges and/or ValidateOnSaveEnabled does not always help.

I have come across the Z.EntityFramework.Extensions on NuGet, but it seems to be a commercial product, which will only work for a certain period of time.

https://www.nuget.org/packages/Z.EntityFramework.Extensions/

So far, I really only need BulkInsert(), BulkUpdate() and BulkDelete().

My question is:

Is there any reliable non-commercial library, that does nearly the same as Z.EntityFramework.Extensions?

Thanks for any hints!

1
9
2/20/2017 1:01:27 PM

Accepted Answer

Disclaimer: I'm the owner of Entity Framework Extensions

You are right. This is a commercial product.

Every month, a free trial is available, but you will have to purchase the product for the production environment.

Bulk Insert

For BulkInsert, there are some free alternatives but be careful, they don't support all inheritances & associations and are no longer supported:

Disclaimer: I'm the owner of Entity Framework Plus

For Batch Update && Batch Delete, you can use this library:

// DELETE all users which has been inactive for 2 years
ctx.Users.Where(x => x.LastLoginDate < DateTime.Now.AddYears(-2))
         .Delete();

// UPDATE all users which has been inactive for 2 years
ctx.Users.Where(x => x.LastLoginDate < DateTime.Now.AddYears(-2))
         .Update(x => new User() { IsSoftDeleted = 1 });
10
8/22/2018 10:26:48 PM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow