加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

域驱动设计 – 这是DDD应用程序还是域服务?

发布时间:2020-12-14 04:49:08 所属栏目:百科 来源:网络整理
导读:我对整个域驱动设计有点陌生,如果你能告诉我你认为这样的服务方法在应用程序或域层中的位置,我会很高兴: ListChildren getChildrenByParent(Parent parent,int offset,int count) { return repository.listChildrenByParent(Parent parent,int count);} 我
我对整个域驱动设计有点陌生,如果你能告诉我你认为这样的服务方法在应用程序或域层中的位置,我会很高兴:

List<Children> getChildrenByParent(Parent parent,int offset,int count) {

   return repository.listChildrenByParent(Parent parent,int count);
}

我还想知道当模型中有大量实体和/或我需要有效地过滤事物时,这是否是一种可接受的做事方式.

谢谢

解决方法

您列出的方法似乎没有任何意义.为什么要使方法getChildrenByParent完全包装repository.listChildrenByParent?它已经在正确的位置 – 在存储库中.只需在需要的地方使用repository.listChildrenByParent.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读