Overview

public class Program
{
    public static void Main(string[] args)
    {
        WebHost.CreateDefaultBuilder(args)
            .UseStartup<Startup>()
            .Build();
    }
}
public Startup(IHostingEnvironment env, IConfiguration config)
{
    HostingEnvironment = env;
    Configuration = config;
}

The ConfigureServices Method