Why is MVC4 using the Service Locator Anti-Pattern?
-
29-10-2019 - |
Pergunta
After reading "Dependency Injection in .NET" by Mark Seemann I stay away from the Service Locator which is an anti-pattern.
Upon reading the release notes on MVC 4 I see:
Improved Inversion of Control (IoC) via DependencyResolver: Web API now uses the service locator pattern implemented by MVC’s dependency resolver to obtain instances for many different facilities.
Thus I'm left curious and confused why Microsoft would use a service locator in 2012.
Nenhuma solução correta
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow