I have just installed the mvc4 rc update and I am trying to build an api application with little luck.
I am using ninject but cant get my controllers to load. I keep
if any anyone is still having problems, please listen for some reason ninject is not working how we would expect with mvc 4. In your web api, you need to write this code
public DefaultController() : base() { }
This removes the error saying about no default constructor, then when you need to get your data from the get method write this code:
public IEnumerable Get()
{
return context.YourData;
}
Keep in mind, you will have to access your db class here as well, for instance:
DefaultConnection context = new DefaultConnection();