Pio*_*otr 3 domain-driven-design
我对整个域驱动设计有点陌生,如果你能告诉我你认为这样的服务方法在应用程序或域层中的位置,我会很高兴:
List<Children> getChildrenByParent(Parent parent, int offset, int count) {
return repository.listChildrenByParent(Parent parent, int offset, int count);
}
Run Code Online (Sandbox Code Playgroud)
我还想知道当模型中有大量实体和/或我需要有效地过滤事物时,这是否是一种可接受的做事方式.
谢谢
您列出的方法似乎没有任何意义.为什么要使方法getChildrenByParent 完全包装repository.listChildrenByParent?它已经在正确的位置 - 在存储库中.只需在需要的地方使用repository.listChildrenByParent.