My service interfaces have a Services.Interfaces namespace
The service interface implementation has a Web.UI.Services namespace
I have 2 implementations of a service, for example
- IUserService that needs to register with UserService
- ICountryService who needs to register with CountryService
This is how I am currently registering these services with SimpleInjector.
container.Register<IUserService, UserService> (); container.Register<ICountryService, CountryService> ();
Problem: if I have more than 100 services to exaggerate a little. I need to go and add a line for each service.
How can I register all implementations from one assembly in all interfaces from another assembly using Simple Injector?
c # asp.net-mvc inversion-of-control ioc-container simple-injector
Shane van wyk
source share