Hot answers tagged

4

The entry point of the application (the UI project) must setup the DI container, providing implementations of all the dependencies. That's why it must have direct connection (reference) to all the other projects. What is important is that the UI classes have dependencies only on BLL classes. The additional references are only for setting up DI.


2

First point - For simplicity, the answer by Rumen is correct. What I do in larger solutions is to have a separate Infrastructure project which set's up the dependency injection container (in .net core, this would be the IServiceCollection). For example in my current solution I have both a Website & an API. Both of these call methods in my ...


Only top voted, non community-wiki answers of a minimum length are eligible