Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/Softeq.NetKit.Chat.Web/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);

Expand All @@ -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();
}
Expand Down