ASP.net MVC4 has this βnewβ web API concept for displaying CRUD functions in your data model. The base class for these controllers is the DataController , which comes from ApiController .
Unfortunately, this ApiController does not derive from IController , which is problematic since these requests cannot be processed through your regular user factory controller, since they must return an instance of IController .
Does anyone know the reason for this, since I donβt understand why you will have a controller in your MVC project that cannot be obtained from IController , since this violates your custom factory controller, since it cannot create an instance of each individual controller in your project .
In short, because of this inheritance, you cannot use your DI container for dependency injection.
thekip
source share