From 57748fa68acf21da53441aaf9c5e48a3d6d16e9a Mon Sep 17 00:00:00 2001 From: Biagio Paruolo Date: Tue, 18 Oct 2022 16:07:06 +0200 Subject: [PATCH] Update Startup.cs Changed sequence calls. --- Apiresources.WebApi/Startup.cs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Apiresources.WebApi/Startup.cs b/Apiresources.WebApi/Startup.cs index 9044c44..c37fbce 100644 --- a/Apiresources.WebApi/Startup.cs +++ b/Apiresources.WebApi/Startup.cs @@ -56,11 +56,12 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env, ILoggerF app.UseHsts(); } - dbContext.Database.EnsureCreated(); - - // Add this line; you'll need `using Serilog;` up the top, too + // Add this line; you'll need `using Serilog;` up the top, too app.UseSerilogRequestLogging(); loggerFactory.AddSerilog(); + + dbContext.Database.EnsureCreated(); + app.UseHttpsRedirection(); app.UseRouting(); //Enable CORS @@ -77,4 +78,4 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env, ILoggerF }); } } -} \ No newline at end of file +}