Skip to content

How to use ORM in DDD

Csaba Bernáth edited this page Jun 28, 2023 · 4 revisions

How to use ORM in DDD

Write model

  • Create the event sourced aggregate. The events will be replayed when saving aggregate to the SQL database.
  • Create the aggregate repository:
    • Save aggregate: replay events in SQL
      • Create insert/update/delete SQL statements with Data Commander
    • Get aggregate by id:
      • create SQL statement manually
      • generate C# wrapper with Data Commander

Read model

  • Create SQL statement manually
  • Generate C# wrapper with Data Commander

Clone this wiki locally