title: Dependency injection in window service class
body: <p>Need a clue to inject properties in my service class in a Windows Service using Autofac.</p>
  
  <pre><code>public partial class SomeService: ServiceBase
  {
      public ILogger {set;get;} // &lt;- how to inject this using AutoFac
      public IRepository {set;get;} // &lt;- how to inject this using AutoFac
  
      protected override void OnStart(string[] args)
      {
          // use ILogger and IRepository
      }
  
  }
  </code></pre>
  
  <p>thank you.</p>