title: dependency injection into a console app
body: <p>We use Autofac to do some simple dependency injection in our web app. It's all configured and registered in classes that operate behind-the-scenes.  It makes injecting stuff in our project painless easy just like this:</p>
  
  <pre><code>//interface
  public interface ISuperHereService
  { }
  
  //class that uses the interface
  public class SuperHeroFactory
  {
      public ISuperHeroService SuperHeroService { get; }
  
      public SuperHeroFactory(ISuperHeroService superHeroService)
      {
         SuperHeroService = superHeroService;
  
         ...do all our stuff...
  </code></pre>
  
  <p>However now I had to create a separate project as a console app. My console app has a Main method.  </p>
  
  <p>I'm not at all sure how to inject an interface into the Main method.</p>
  
  <p>Is this possible?</p>
  
  <p>Thanks!</p>