Skip to content

Commit a1c7631

Browse files
committed
Seed database also in production if necessary
1 parent b629a85 commit a1c7631

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

backend/src/Program.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,8 @@ string[] commandLineArguments
5555
startup.Configure(application);
5656
using (var scope = application.Services.CreateScope())
5757
{
58-
if (application.Environment.IsDevelopment())
59-
// https://docs.microsoft.com/en-us/aspnet/core/data/ef-mvc/intro#initialize-db-with-test-data
60-
await CreateAndSeedDb(scope.ServiceProvider).ConfigureAwait(false);
58+
// Inspired by https://docs.microsoft.com/en-us/aspnet/core/data/ef-mvc/intro#initialize-db-with-test-data
59+
await CreateAndSeedDb(scope.ServiceProvider).ConfigureAwait(false);
6160
}
6261

6362
application.Run();

0 commit comments

Comments
 (0)