工作单元实施

发布于 2024-07-13 10:11:51 字数 484 浏览 15 评论 0原文

可能我太n00b无法理解这一点,但我正在阅读Gabriel Schenker http://nhibernate.info/doc/patternsandpractices/nhibernate-and-the-unit-of-work-pattern.html UnitOfWork 实现,我真的无法明白这一点。

为什么UnitOfWorkImplementor.Dispose需要将dispose转发给UnitOfWorkFactory,而这又转发给UnitOfWork??? 为什么 UnitOfWorkImplementor 不能自行处置?

还有其他 UnitOfWork 实现示例吗? (请更简单的)。

谢谢!

probably I'm too n00b to understand this, but I was reading the Gabriel Schenker http://nhibernate.info/doc/patternsandpractices/nhibernate-and-the-unit-of-work-pattern.html UnitOfWork implementation and I really cannot get the point.

Why does the UnitOfWorkImplementor.Dispose need to forward the dispose to the UnitOfWorkFactory and this forwards to UnitOfWork??? Why on earth cannot UnitOfWorkImplementor Dispose itself?

Is there any other UnitOfWork implementation example around? (An easier one please).

Thanks!

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

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

发布评论

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

评论(1

梦醒灬来后我 2024-07-20 10:11:51

静态 UnitOfWork 可能需要被告知当前的 UoW 不再可用。

It could be that the static UnitOfWork needs to be told the current UoW is no longer available.

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