随笔分类 -  设计模式

工作单元模式(UnitOfWork)学习总结
摘要:工作单元的目标是维护变化的对象列表。使用IUnitOfWorkRepository负责对象的持久化,使用IUnitOfWork收集变化的对象,并将变化的对象放到各自的增删改列表中,最后Commit,Commit时需要循环遍历这些列表,并由Repository来持久化。Maintains a list of objects affected by a business transaction and coordinates the writing out of changes and the resolution of concurrency problems. 要实现一个银行卡简单转账的功能. 阅读全文
posted @ 2013-11-26 13:43 小桥屋檐下 阅读(13607) 评论(11) 推荐(10) 编辑