use WebHost.CreateDefaultBuilder in IdentitySample.Mvc

so that it picks up the logging config from the `appsettings.json`
This commit is contained in:
Tugberk Ugurlu 2017-09-09 22:00:49 +01:00 committed by Hao Kung
parent e85a935d45
commit 20ec50d5d2
1 changed files with 6 additions and 11 deletions

View File

@ -1,20 +1,15 @@
using System.IO;
using Microsoft.AspNetCore;
using Microsoft.AspNetCore.Hosting;
namespace IdentitySample
{
public static class Program
{
public static void Main(string[] args)
{
var host = new WebHostBuilder()
.UseKestrel()
.UseContentRoot(Directory.GetCurrentDirectory())
.UseIISIntegration()
public static void Main(string[] args) => BuildWebHost(args).Run();
public static IWebHost BuildWebHost(string[] args) =>
WebHost.CreateDefaultBuilder(args)
.UseStartup<Startup>()
.Build();
host.Run();
}
}
}
}