I am building an application using Ninject (MVC5 + WEBAPI). And having some issues figuring out which ones of the many answers explain the most up to date solution to integrate Ninject and WebApi. So I have the following packages installed:
Some people suggest that my initial problem (Ninject is not resolving the API controllers instantiation) should be resolved by either:
So it comes down to, what are all this packages? Also, do I need to use Owin hosting? I got an 'Unable to find package Ninject.Web.WebApi' message from nuget console so I assume this one doesn't exist anymore?.
Thanks.
There are several packages you need to get Ninject working with Web API 2:
After you install all of those, you'll find a pre-built NinjectWebCommon class in your App_Start folder. Just add you bindings to the RegisterServices() method.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With