I have 2 controllers that depend on ISomeService
public class FirstController
{
public FirstController(ISomeService someService)
{
}
}
public class SecondController
{
public SecondController(ISomeService someService)
{
}
}
ISomeServicehas one implementation, which depends on IRepository:
public class SomeService : ISomeService
{
public SomeService(IRepository repository)
{
}
}
IRepositoryhas 2 implementations: FirstRepositoryand SecondRepository.
How to configure a container for permission FirstControllerusing FirstRepositoryand SecondControllerwith SecondRepository?
source
share