tag:blogger.com,1999:blog-3518945678469852273.post7564348904803949192..comments2024-03-02T10:30:30.613+00:00Comments on Jahya Code .NET: Using Autofac's Auto-Factories to Avoid Service LocatorAnonymoushttp://www.blogger.com/profile/18128476386123092269noreply@blogger.comBlogger1125tag:blogger.com,1999:blog-3518945678469852273.post-90579387530263683822012-03-16T08:47:30.494+00:002012-03-16T08:47:30.494+00:00Nice post! The only thing I might add to this is t...Nice post! The only thing I might add to this is that the decision to use Service Location for resolving your dependencies is an architectural decision taken by the developer, independent of the DI container being used. In the same way that you can use Autofac to register your dependencies at the entry point to your application, you can do the same with StructureMap. Likewise, you can use Autofac for Service Location if you really want to. The advantage that using a DI container gives you over resolving the dependencies yourself is only apparent if you don't use Service Location, as you've highlighted in your article. I do agree that Autofac is generally more elegant in its approach.Levelnishttps://www.blogger.com/profile/10111523802574889111noreply@blogger.com