How does Ninject create controller in ASP.NET MVC?

后端 未结 3 1412
名媛妹妹
名媛妹妹 2021-01-02 04:05

This may be stupid question, but I am looking at Ninject sources and don\'t see NInject registering its own controller factory. I also don\'t see any IControllerFactor

3条回答
  •  醉酒成梦
    2021-01-02 04:51

    MVC3 now recommends the usage of the IDependencyResolver interface instead of the good old IControllerFactory when dealing with DI. You can look at more details of this interface here.

    This is the new Ninject class responsible for injecting the dependencies.

提交回复
热议问题