Is there a non-commercial alternative to Z.EntityFramework.Extensions?(是否有 Z.EntityFramework.Extensions 的非商业替代品?)
问题描述
实体框架在批量插入/更新/删除操作时可能会非常慢.即使是经常建议的关闭 AutoDetectChanges 和/或 ValidateOnSaveEnabled 的调整也并不总是有帮助.
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.
我在 NuGet 上遇到过 Z.EntityFramework.Extensions,但它似乎是一个商业产品,只能在一段时间内工作.
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/
到目前为止,我真的只需要 BulkInsert()、BulkUpdate() 和 BulkDelete().
So far, I really only need BulkInsert(), BulkUpdate() and BulkDelete().
我的问题是:
是否有任何可靠的非商业库,其功能与 Z.EntityFramework.Extensions 几乎相同?
感谢任何提示!
推荐答案
免责声明:我是 实体框架扩展
你是对的.这是一个商业产品.
You are right. This is a commercial product.
每个月都提供免费试用,但您必须为生产环境购买产品.
批量插入
对于 BulkInsert,有一些免费的替代方案,但要小心,它们不支持所有继承 &关联并且不再受支持:
For BulkInsert, there are some free alternatives but be careful, they don't support all inheritances & associations and are no longer supported:
- https://www.nuget.org/packages/EntityFramework.BulkInsert-ef6
- https://github.com/MikaelEliasson/EntityFramework.Utilities
免责声明:我是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 });
这篇关于是否有 Z.EntityFramework.Extensions 的非商业替代品?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:是否有 Z.EntityFramework.Extensions 的非商业替代品?


- 带问号的 nvarchar 列结果 2022-01-01
- 为什么 C# 中的堆栈大小正好是 1 MB? 2022-01-01
- 在 C# 中异步处理项目队列 2022-01-01
- Windows 喜欢在 LINUX 中使用 MONO 进行服务开发? 2022-01-01
- Azure Active Directory 与 MVC,客户端和资源标识同一 2022-01-01
- 是否可以在 .Net 3.5 中进行通用控件? 2022-01-01
- 使用 rss + c# 2022-01-01
- CanBeNull和ReSharper-将其用于异步任务? 2022-01-01
- C# 通过连接字符串检索正确的 DbConnection 对象 2022-01-01
- 在 LINQ to SQL 中使用 contains() 2022-01-01