ormdomain-driven-designddd-repositoriesdomain-object

Should child entity classes have their own repositories?


I have several classes inheriting from an Admin class: Manager, Translator, etc.

Admin is an aggregate, so should have its own Repository. However, some methods to find Managers or Translators might be specific to these classes. Others might be common to all Admins.

What is the best practice here? Should I:


Solution

  • As I see - it doesn't matter that much.

    I would stick with one AdminRepository unless it bloats and begs for decomposition.