title: Is having a factory with a reference to the container an anti-pattern?
body: <p>In the case where your factory takes the IOC container as a constructor parameter and then uses the container to resolve an interface. </p>
  
  <p>It is often stated that the <a href="http://blog.ploeh.dk/2011/07/28/CompositionRoot/" rel="nofollow">only place the container should be referenced</a> is your application entry point (Composition Root). Having the container in the factory goes against this</p>
  
  <p>Is this an anti-pattern?
  Is it bad?
  Are there alternatives?</p>