diff --git a/ReadMe.md b/ReadMe.md index 7c36e04..c08a637 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -942,7 +942,7 @@ If you have other applications such as ASP.NET in the entire project and want to // Package Import: Microsoft.Extensions.Hosting var builder = Host.CreateApplicationBuilder(); // don't pass args. -using var host = builder.Build(); // using +using var host = builder.Build(); // use using for host lifetime ConsoleApp.ServiceProvider = host.Services; // use host ServiceProvider ConsoleApp.Run(args, ([FromServices] ILogger logger) => logger.LogInformation("Hello World!")); @@ -986,7 +986,7 @@ v4 -> v5 Migration Guide v4 was running on top of `Microsoft.Extensions.Hosting`, so build a Host in the same way and set up a ServiceProvider. ```csharp -using var host = Host.CreateDefaultBuilder().Build(); +using var host = Host.CreateDefaultBuilder().Build(); // use using for host lifetime ConsoleApp.ServiceProvider = host.ServiceProvider; ```