Playing around with various IoC containers in various scenarios.
Core
depends on nothing. This is a good thing!*Dependency
projects (SQL, PayPal, etc.) depend onCore
(for interface/contract definitions).DependencyResolution
depends onCore
(for interfaces),*Dependency
(for implementation), andNinject
(via NuGet, to wire up IoC).UI Projects
(Console, Web Forms, MVC, etc.) depend onCore
(for interfaces) andDependencyResolution
(to initialize IoC and retrieve instances of interfaces).- Nothing depends on any of the
UI Projects
- Nothing depends on any of the
With this setup, Core
is free of any dependencies, and the rest of your project is actually not even dependent on which IoC container you choose to use (the only thing that knows which IoC you're using is DependencyResolution
). Your UI need only know about your Core
and DependencyResolution
projects, without any concern for concrete implementations.