EnsureAvailableAsync() публичный Метод

Checks server and database availability. If there is no database file, copy and attach initial database. Update database if it is outdated.
If connection fails, the exception must be handled by the caller.
public EnsureAvailableAsync ( ) : Task
Результат Task
 private async Task TestDatabaseConnectionAsync() {
     // Test connection to database.
     DatabaseHandler db = new DatabaseHandler();
     try {
         await db.EnsureAvailableAsync();
     }
     catch (Exception ex) {
         string ErrorMessage = "Cannot connect to database.\r\n" + ex.Message;
         MessageBox.Show(Main, ErrorMessage, "Natural Grounding Player");
         App.Current.Shutdown();
     }
 }