title: Why is function CreateWebHostBuilder() created?
body: <p>When creating a ASP.NET Core 2.2 Web API, Visual Studio 2019 creates this code:</p>
  
  <pre><code>namespace myapi
  {
      public class Program
      {
          public static void Main(string[] args)
          {
              CreateWebHostBuilder(args).Build().Run();
          }
  
          public static IWebHostBuilder CreateWebHostBuilder(string[] args) =&gt;
              WebHost.CreateDefaultBuilder(args)
                  .UseStartup&lt;Startup&gt;();
      }
  }
  </code></pre>
  
  <p>Why the heck is it creating a function <code>CreateWebHostBuilder</code> ? 
  Why does it not just create a code as follows? </p>
  
  <pre><code>namespace myapi
  {
      public class Program
      {
          public static void Main(string[] args)
          {
              WebHost.CreateDefaultBuilder(args).UseStartup&lt;Startup&gt;().Build().Run();
          }
      }
  }
  </code></pre>