title: How add startup class to worker service template in .net core 3
body: <p>I want to add Startup class to worker service template in dotnet core 3 in order to use Configuration as dependency injection. I don't want to use my Program class to configure services. If there is another way to use Configuration, please give me an info about. Thank you.</p>
  
  <p>this is my Standart program class code and I just added Hangfire</p>
  
  <pre><code>public static IHostBuilder CreateHostBuilder(string[] args) =&gt;
          Host.CreateDefaultBuilder(args)
              .ConfigureServices((hostContext, services) =&gt;
              {
                  services.AddHangfire(x =&gt;
                      x.UsePostgreSqlStorage(Configuration.GetConnectionString("defaultConnection"))
                  );
  
                  services.AddHostedService&lt;Worker&gt;();
              });
  </code></pre>
  
  <p>I just want to seperate my services to configure in Startup class</p>
  
  <pre><code>UseStartup&lt;Startup&gt;();
  </code></pre>