I am using Ninject 2 with Asp.Net MVC 3. I have following module.
public class ServiceModule : NinjectModule
{
public override void Load()
{
//I need to get the 'configHelper' from Ninject Container.
IConfigHelper configHelper = ResolveConfigHelperHere();
Bind<IMyService>().To<MyServiceImpl>().WithConstructorArgument("myArg", configHelper.MyProperty);
}
}
How do we get the instance of ‘IConfigHelper’ which is already Bind in Ninject module?
and here’s a full example: