domain-driven-design - 这是 DDD 应用程序还是域服务?

标签 domain-driven-design

我对整个领域驱动设计有点陌生,如果您能告诉我您认为这样的服务方法属于应用程序或领域层的哪个位置,我会很高兴:

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

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

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

谢谢

最佳答案

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

关于domain-driven-design - 这是 DDD 应用程序还是域服务?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4146176/

相关文章:

domain-driven-design - DDD 中的应用级设置?

domain-driven-design - DDD : Using Value Objects inside controllers?

php - 域模型 MVC 中的 native 数据库查询

.net - 如何实现DDD存储库以处理具有多个实体的查询?

java - 存储库可以返回 DDD 中的分页集合吗?

database - 逻辑模型与领域模型

domain-driven-design - DDD - 构建存储库

c# - Winforms 选择哪种设计模式/敏捷方法论

c# - 遵循 DDD 概念设计存储库

c# - 领域驱动设计适合我的项目吗?