From 3279da137ebcf553b5e0c6c7d2fb5b9b2060190c Mon Sep 17 00:00:00 2001 From: Gredja Date: Tue, 21 May 2019 13:10:37 +0300 Subject: [PATCH] Created async methods --- src/Softeq.NetKit.Chat.Web/Startup.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Softeq.NetKit.Chat.Web/Startup.cs b/src/Softeq.NetKit.Chat.Web/Startup.cs index edf903f..1bfcc59 100644 --- a/src/Softeq.NetKit.Chat.Web/Startup.cs +++ b/src/Softeq.NetKit.Chat.Web/Startup.cs @@ -4,6 +4,7 @@ using System; using System.Collections.Generic; using System.Linq; +using System.Threading.Tasks; using Autofac; using Autofac.Extensions.DependencyInjection; using CorrelationId; @@ -118,7 +119,7 @@ public IServiceProvider ConfigureServices(IServiceCollection services) } // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. - public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory, IDatabaseManager databaseManager, IApplicationLifetime applicationLifetime, ILogger logger) + public async Task Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory, IDatabaseManager databaseManager, IApplicationLifetime applicationLifetime, ILogger logger) { applicationLifetime.ApplicationStopping.Register(OnShutdown, app); @@ -130,7 +131,7 @@ public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerF { if (!env.IsStaging() && !env.IsProduction()) { - databaseManager.CreateEmptyDatabaseIfNotExistsAsync().GetAwaiter().GetResult(); + await databaseManager.CreateEmptyDatabaseIfNotExistsAsync(); } databaseManager.MigrateToLatestVersion(); }