From 73ad39ed2db9ff1e60e3f1474b9ee99553acc790 Mon Sep 17 00:00:00 2001 From: Halil ibrahim Kalkan Date: Tue, 19 Feb 2019 11:28:26 +0300 Subject: [PATCH] Update Getting-Started-AspNetCore-Application.md --- .../Getting-Started-AspNetCore-Application.md | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/docs/en/Getting-Started-AspNetCore-Application.md b/docs/en/Getting-Started-AspNetCore-Application.md index fe1ff3450b..8d3c898787 100644 --- a/docs/en/Getting-Started-AspNetCore-Application.md +++ b/docs/en/Getting-Started-AspNetCore-Application.md @@ -152,6 +152,27 @@ services.AddApplication(options => }); ```` +4. Update `Program.cs` to not use the `WebHost.CreateDefaultBuilder()` method since it uses the default DI container: + +````csharp +public class Program +{ + public static void Main(string[] args) + { + BuildWebHostInternal(args).Run(); + } + + public static IWebHost BuildWebHostInternal(string[] args) => + new WebHostBuilder() + .UseKestrel() + .UseContentRoot(Directory.GetCurrentDirectory()) + .UseIISIntegration() + .UseStartup() + .Build(); +} +```` + ## Source Code Get source code of the sample project created in this tutorial from [here](https://github.com/abpframework/abp/tree/master/samples/BasicAspNetCoreApplication). +