I am doing a design using PRISM framework and Domain-Driven design pattern. I have a question regarding the domain type reference between different Modules.
I have a Module (Assembly) called Order, another Module (Assembly) called Product. In the Model and ViewModel of the Order Module, we will use Product Class (Type) from Product Module.
How can I reference the Product type with loosely-coupled way.
I am thinking to do this by two ways:
Thanks a lot.
Kevin
I have a Module (Assembly) called Order, another Module (Assembly) called Product. In the Model and ViewModel of the Order Module, we will use Product Class (Type) from Product Module.
How can I reference the Product type with loosely-coupled way.
I am thinking to do this by two ways:
-
Define all the domain types in the Infrastructure Assembly, which will be referenced by all the Modules
-
Define the interfaces in Infrastructure Assembly, and the domain types in the Modules will implement the according interface (Like Product will implement IProduct).
Thanks a lot.
Kevin