如何使用 Save 的工作单元模式来提供事务功能而不需要 msdtc?
我正在编写一种方法,必须保存对数据库中的实体所做的更改。如何将工作单元模式用于我的保存方法?
I am writing a method that has to save the changes made to entities in the database. How can I use Unit Of Work Pattern for my Save method?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
参考经典的 Martin Fowler 的 工作单元 设计
所以基本上 Save() 会是这样
的请参阅 stackexchange Code Review 站点上的界面示例:工作单元接口
Reference to a classical Martin Fowler's Unit of Work design
So basically Save() would be like this
Also see an interface example on stackexchange Code Review site: Unit Of Work Interface