Why is MVC4 using the Service Locator Anti-Pattern?
-
29-10-2019 - |
سؤال
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.
لا يوجد حل صحيح
لا تنتمي إلى StackOverflow