What's an Aggregate Root?

前端 未结 11 1331
臣服心动
臣服心动 2020-11-22 04:18

I\'m trying to get my head around how to properly use the repository pattern. The central concept of an Aggregate Root keeps coming up. When searching both the web and Stack

11条回答
  •  渐次进展
    2020-11-22 04:29

    Aggregate means collection of something.
    root is like top node of tree, from where we can access everything like node in web page document.
    Blog Analogy, A user can have many posts and each post can have many comments. so if we fetch any user then it can act as root to access all the related posts and further comments of those posts. These are all together said to be collection or Aggregated

提交回复
热议问题