aboutsummaryrefslogtreecommitdiff
path: root/Timeline/Program.cs
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2020-06-15 00:05:02 +0800
committercrupest <crupest@outlook.com>2020-06-15 00:05:02 +0800
commite0b4c538228864c314900affae08df72edc9cd60 (patch)
treefc07d6d2622140f82a2c7e3c50aecf759c144043 /Timeline/Program.cs
parentcf2cfa4853944ce0af6b6c22a089b937dd59ccaf (diff)
downloadtimeline-e0b4c538228864c314900affae08df72edc9cd60.tar.gz
timeline-e0b4c538228864c314900affae08df72edc9cd60.tar.bz2
timeline-e0b4c538228864c314900affae08df72edc9cd60.zip
refactor(back): Use generic host.
Diffstat (limited to 'Timeline/Program.cs')
-rw-r--r--Timeline/Program.cs10
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>();
+ });
}
}