title: With Autofac what would be the advantages and disadvantages
body: <p>I've read about Autofac that it's fast. I've seen the coding involved and it's pretty neat. But I'm not quite sure how to use it. I've used StructureMap, and it has a static ObjectFactory. Ninject has the Kernel, but in Autofac's Google pages they recommend doing something like this :  </p>
  
  <pre><code>using( var resolver = builder.Build() ){
     var whatINeed = resolver.Resolve&lt;INeedThisService&gt;();
  }
  </code></pre>
  
  <p>It's a WinForms app, so I got an Invalid Object state from doing the above, so I switched to having a global IContainer, and did it this way</p>
  
  <pre><code> using( var resolver = Program.Container.CreateInnerContainer() )
   {
       var whatINeed = resolver.Resolve&lt;INeedThisService&gt;();
   }
  </code></pre>
  
  <p>I've used it about 3 or 5 times. But is that efficient? Or should I just do something like</p>
  
  <pre><code> var whatINeed = Program.Resolve&lt;INeedThisService&gt;()
  </code></pre>
  
  <p>and under the covers</p>
  
  <pre><code> internal static TServervice Resolver&lt;TService&gt;(){
         if(_container == null ) _container = builder.Build();
         return _container.Resolve&lt;TService&gt;();
   }
  </code></pre>
  
  <p>Which would you use, and why? Also is there a penalty for working with CreateInnerContainer()?</p>