diff options
author | crupest <crupest@outlook.com> | 2020-06-15 00:05:02 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2020-06-15 00:05:02 +0800 |
commit | f7ec671a7422ea1fc6de4bb310fed3b4933f27e9 (patch) | |
tree | f0257e17a4c7828d8c88de2f306a59cdd588ceba /Timeline/Program.cs | |
parent | 98f1ec6e27616d292f86cce30223f0a267c35fd3 (diff) | |
download | timeline-f7ec671a7422ea1fc6de4bb310fed3b4933f27e9.tar.gz timeline-f7ec671a7422ea1fc6de4bb310fed3b4933f27e9.tar.bz2 timeline-f7ec671a7422ea1fc6de4bb310fed3b4933f27e9.zip |
refactor(back): Use generic host.
Diffstat (limited to 'Timeline/Program.cs')
-rw-r--r-- | Timeline/Program.cs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/Timeline/Program.cs b/Timeline/Program.cs index 0540fbd1..87e330a2 100644 --- a/Timeline/Program.cs +++ b/Timeline/Program.cs @@ -1,4 +1,3 @@ -using Microsoft.AspNetCore;
using Microsoft.AspNetCore.Hosting;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection;
@@ -34,8 +33,11 @@ namespace Timeline host.Run();
}
- public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
- WebHost.CreateDefaultBuilder(args)
- .UseStartup<Startup>();
+ public static IHostBuilder CreateWebHostBuilder(string[] args) =>
+ Host.CreateDefaultBuilder(args)
+ .ConfigureWebHostDefaults(webBuilder =>
+ {
+ webBuilder.UseStartup<Startup>();
+ });
}
}
|