I am new to DDD and wants to clarify few doubts. Any help is appreciated.
In DDD model the assembly reference hierarchy top down, which means Model can reference Infrastructure and should not be other way round. Now if we declare all our classes in Model assembly then in that case, the Infrastructure class will have to refer the Model Assembly for to get the class information for Concrete repository implementation in the data access layer (DAL). Also Model assembly will have to reference the Infrastructure Assembly to access the DAL layer. I am confused about this! What should be the right approach?
Should we have the Repository and UnitOfWork interface in Model layer or Infrastructure DAL layer as in like have the interface in Model layer but the actual DAL implementation in Infrastructure layer?
If we need other assembly which contains some generic utility functions or Classes (like custom CommandMessage class etc to communicate within Enterprise Service Bus architecture), where do we place all those things and what should be the preferred namespace (For example
CompanyName.Model.Common
)?