title: How to resolve instance with Autofac and Asp.Net MVC
body: <p>I have just started to try out Autofac and I think I am confusing myself with resolving the concrete classes. </p>
  
  <p>I have managed to register my Interfaces to my Concrete classes as below</p>
  
  <pre><code>builder.RegisterType&lt;TestClass&gt;().As&lt;ITest&gt;();
  var container = builder.Build();
  DependencyResolver.SetResolver(new AutofacDependencyResolver(container));
  </code></pre>
  
  <p>This builds fine. The problem I am having is how to do get an instance of this in my mvc controller? Most things I have read say I need to create a new instance of ContainerBuilder and then call the scope.Resolve method, but surely this is bad practice and shouldnt be needed in each controller?</p>
  
  <p>I think the confusion is when and how to access 'Container' so that I can call the resolve method as and when I need to.</p>
  
  <p>Im a newbie at this as you have probably guessed!</p>