Magnus Lindhe

Heads up when using dependency injection with ASP.NET MVC and Web API

ASP.NET MVC 3 and ASP.NET Web API (Beta) uses different but identical interfaces named IDependencyResolver but located in two different namespaces.

ASP.NET MVC 3 uses the interface IDependencyResolver located in the namespace System.Web.Mvc to resolve dependencies. The ASP.NET Web API (Beta) on the other hand uses an interface with the same name but located in the System.Web.Http.Services namespace to resolve dependencies.

Since both interface provide the same abstraction I wonder why it is designed this way and if they will resolve (pun intended) this issue in the next release.

comments powered by Disqus