aboutsummaryrefslogtreecommitdiff
path: root/BackEnd/Timeline/Program.cs
diff options
context:
space:
mode:
Diffstat (limited to 'BackEnd/Timeline/Program.cs')
-rw-r--r--BackEnd/Timeline/Program.cs15
1 files changed, 2 insertions, 13 deletions
diff --git a/BackEnd/Timeline/Program.cs b/BackEnd/Timeline/Program.cs
index 19fa6e37..e16c27c5 100644
--- a/BackEnd/Timeline/Program.cs
+++ b/BackEnd/Timeline/Program.cs
@@ -7,7 +7,7 @@ using System.Resources;
using System.Threading.Tasks;
using Timeline.Entities;
using Timeline.Services;
-using Timeline.Services.Migration;
+using Timeline.Services.DatabaseManagement;
[assembly: NeutralResourcesLanguage("en")]
@@ -19,18 +19,7 @@ namespace Timeline
{
var host = CreateWebHostBuilder(args).Build();
- var databaseBackupService = host.Services.GetRequiredService<IDatabaseBackupService>();
- databaseBackupService.BackupNow();
-
- using (var scope = host.Services.CreateScope())
- {
- var databaseContext = scope.ServiceProvider.GetRequiredService<DatabaseContext>();
- await databaseContext.Database.MigrateAsync();
- var customMigrationManager = scope.ServiceProvider.GetRequiredService<ICustomMigrationManager>();
- await customMigrationManager.Migrate();
- }
-
- host.Run();
+ await host.RunAsync();
}
public static IHostBuilder CreateWebHostBuilder(string[] args) =>