Updating ConfigureServices overload (#9711)

Using the overload where the HostBuilderContext is available to support common usage scenarios such as accessing the environment and configuration whilst registering services.
This commit is contained in:
Steve Gordon 2019-04-25 09:30:33 -07:00 committed by David Fowler
parent 4f330271b8
commit b033883728
1 changed files with 1 additions and 1 deletions

View File

@ -16,7 +16,7 @@ namespace Company.Application1
public static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureServices(services =>
.ConfigureServices((hostContext, services) =>
{
services.AddHostedService<Worker>();
});