0

How to create a new record (for example product) when the product exists in multiple bounded contexts and the client enters all the data for the product at once?

manfrom
  • 91
  • 7

1 Answers1

3

You need to have one bounded context that owns the product, probably amongst other bits of the model. This bounded context becomes the "system of record", this is important in the scenario in which data is inconsistent/corrupted in one of the other bounded contexts.

When a product is created/updated/deleted, that bounded context can emit an event that the other bounded contexts use to create their own representation of a product.

I would suggest you to get a copy of Implementing Domain-Driven Design. It's a great book and does explains similar scenarios.

Augusto
  • 28,839
  • 5
  • 58
  • 88