Say, I have such classes hierarchy:
public interface IRepository { } public class SomeSimpleRepository : IRepository {}
Now I want to \"de
Use WhenInjectedInto:
WhenInjectedInto
Bind<IRepository>().To<MoreAdvancedRespository> .WhenInjectedInto<TrickyRepository>(); Bind<IRepository>().To<SomeSimpleRepository> .WhenInjectedInto<MoreAdvancedRespository>();
See this blog post for more info.