I am new to ninject using ninject 2.0. My application is hosted in asp.net mvc.
Now I do not know how to access the kernel created in my class library.
I think I should create a kernel in global.aspx and load all modules into it. But how can I make it available throughout the application?
protected void Application_Start()
{
RegisterRoutes(RouteTable.Routes);
IKernel kernel = new StandardKernel(new ServiceModule());
}
Where should the kernel above be created? and how to access it?
source
share