我和Ninject有一节课
但我不知道Ninject有多高。
为什么总是要输入这个方法?
protected override IController GetControllerInstance(
System.Web.Routing.RequestContext requestContext,
System.Type controllerType)
{
return controllerType == null
? null
: (IController)ninjectKernel.Get(controllerType);
}发布于 2013-02-09 04:31:37
Ninject是一个IOC (Inversion of Control)包。
您总是在键入的代码,会要求第九对象容器查找指定类型的控制器。
https://stackoverflow.com/questions/14780789
复制相似问题