Reputation: 853
I have a class with Ninject
but I don't know Ninject so hight.
Why always must type this method?
protected override IController GetControllerInstance(
System.Web.Routing.RequestContext requestContext,
System.Type controllerType)
{
return controllerType == null
? null
: (IController)ninjectKernel.Get(controllerType);
}
Upvotes: 0
Views: 100
Reputation: 35477
Ninject is an IOC (Inversion of Control) package.
The code you are always typing, asks the Ninject container to find the controller for the specified type.
Upvotes: 1