What's an Aggregate Root?

前端 未结 11 1345
臣服心动
臣服心动 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:27

    Aggregate is where you protect your invariants and force consistency by limiting its access thought aggregate root. Do not forget, aggregate should design upon your project business rules and invariants, not database relationship. you should not inject any repository and no queries are not allowed.

提交回复
热议问题