So my problem is the following. My solution contains the following projects (with references):
- Presentation Layer, contains Views (has a reference to Application Layer)
- Application Layer, contains ViewModels (has a reference to Domain and Persistence Layer)
- Domain Layer, contains all Models (no reference to anything)
- Persistence Layer, stores data with Entity Framework (reference to Domain Layer)
All right, now I want to use Dependency Injection to decouple my ViewModels from Services and other stuff. Because I'm also using a dialogs, I also need to inject the IDialogService with the implementation DialogService. Now, the DialogService uses some Presentation-specific DLLs which are only in the Presentation project so I had to implement the IDialogService interface in the Presentation project, but the Unity-Container is in the Application Layer. I think you can see what my problem is: I only have a reference from Presentation Layer to Application Layer, not the other way.
Am I doing this right and how can I solve this problem?