关于DDD的Repository仓库需要哪些方法? DDD的仓库我想到一下方法,还需要哪些方法呢?function Repo(){}var r = Repo.prototype;r.create = function(cb){};r.find = function(){ };r.findById = function(id,cb){ };r.removeById = function(){};这些方法,还需要哪些方法?更好的写法应该是,单例比较好。var repo = { find:function(){} ,findById:function(){} ,removeById:function(){} ,create:function(){}}[该贴被brighthas于2012-06-30 16:56修改过]