/// <summary> /// Configures the database /// </summary> /// <returns>Task</returns> private static async Task ConfigureDb() { do { string connectionString = MessageService.GetMongoDbConnectionString(); AppSettingUpdater.AddOrUpdateAppSetting((config) => config.MongoDb.ConnectionString = connectionString); string databaseName = MessageService.GetMongoDbDatabasename(); AppSettingUpdater.AddOrUpdateAppSetting((config) => config.MongoDb.DbName = databaseName); MessageService.PrintVerifyingDatabase(); try { ServiceProvider serviceProvider = ServiceProviderBuilder.BuildServiceProvider(); IDbSetup dbSetup = serviceProvider.GetService <IDbSetup>(); await dbSetup.SetupDatabaseAsync(); MessageService.PrintSuccessVerifyingDatabase(); break; } catch (Exception ex) { MessageService.PrintErrorVerifyingDatabase(ex); } }while(true); }
public async Task <IActionResult> DbSetup() { await _DbSetup.SetupDatabaseAsync(); await _KartaMarkerLabelSync.SyncMarkerLabels(); await _TaskNumberFill.FillTasks(); return(View()); }
public async Task <IActionResult> DbSetup() { await _DbSetup.SetupDatabaseAsync(); return(View()); }