2
How to register dependencies with Windsor that are in different layers of the application?
I don’t want to keep referencing all layers of the application in the presentation layer as most do around.
I have the following error that I know why it happens, I wonder if someone could assist to register these dependencies that are in other layers of the application without having to keep referencing everything in the presentation layer.
Can’t create 'Blognetapp.Implementation.Serviceappusuario' as it has dependencies to be satisfied.
'Blognetapp.Implementation.Serviceappusuario' is Waiting for the following dependencies: - Service 'Blognetdomain.Interfaces.Services.Iusuarioservice' which was not Registered.
I’m using C# NET MVC Windsor container.
namespace BlogNet.Windsor
{
public class PresentationInstaller : IWindsorInstaller
{
public void Install(IWindsorContainer container, IConfigurationStore store)
{
container.Register(
Component.For<IServiceAppUsuario>().ImplementedBy<ServiceAppUsuario>(),
Component.For<IServiceAppRole>().ImplementedBy<ServiceAppRole>(),
Component.For<IServiceAppQuote>().ImplementedBy<ServiceAppQuote>()
);
}
}
}
As I said before, it is giving error because it is not registering the dependencies that are in another layer. I don’t want to reference the other layers in the presentation layer.
Hello @allansud! What programming language are you using? If possible add more information to your question as lines of your code that is giving problem and everything you find useful that can help. You can do this by clicking edit
– MateusDemboski
@Mateusdemboski I’m using . NET MVC with C#. I’m looking for someone to help me record dependency injection dependencies without referencing all layers of the project in the presentation layer.
– Allansud