November 26, 2014

Befriending ASP.NET Web.API2, OWIN and Ninject

There are many articles where people writing about how to use WebAPI + Owin, much less talking about Owin + Ninject and very little gathering all together. Also in these rare articles I couldn't find working solution, so I decided to put all eggs in one basket and write how to use WebAPI + Owin + Ninject. It's very strange that most of the posts talking about using Unity, not Ninject, which I love the most (think not only I).

First, let's prepare our environment, I'm using Visual Studio 2013, but if you are still VS2012 user, you can download ASP.NET and Web Tools 2013.1 for Visual Studio 2012 from Microsoft site. Now we are ready to rock!

1. Create new solution. Choose Empty ASP.NET Web application