“工作单元”是什么意思? NHibernate 和其他 ORM 中的概念?

发布于 2024-09-02 18:44:45 字数 42 浏览 10 评论 0原文

NHibernate 和其他 ORM 中“工作单元”概念的含义是什么?

What is the meaning of "Unit of Work" concept in NHibernate and other ORMs?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

鱼窥荷 2024-09-09 18:44:45

这篇博文< /a>.

“工作单元会跟踪您在业务事务期间所做的所有可能影响数据库的操作。完成后,它会计算出更改数据库所需执行的所有操作作为你工作的结果。”

It is explained very well in this blog post.

"A Unit of Work keeps track of everything you do during a business transaction that can affect the database. When you're done, it figures out everything that needs to be done to alter the database as a result of your work."

肤浅与狂妄 2024-09-09 18:44:45

工作单元是一起提交或回滚的一个或多个数据库事务:要么全部成功,要么全部失败。这就是数据库 ACID 属性的想法。

A unit of work is one or more database transactions that are either commited or rolled back together: either all succeed or all fail. It's the idea of ACID properties for databases.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文