private async void StartSqlImport(long[] accounts) { if (accounts == null || accounts.Length == 0) { _dialogService.ShowWarning("Please select at least one account"); return; } if (string.IsNullOrEmpty(View.MongoDbConnectionString)) { _dialogService.ShowWarning("MongoDB connection string is empty!"); return; } if (string.IsNullOrWhiteSpace(View.SqlConnectionString)) { _dialogService.ShowWarning("Empty SQL connection string!"); return; } var progress = new Progress <ImportProgress>(); progress.ProgressChanged += SqlImport_ProgressChanged; View.ClearLog(); View.SetProcessPercentage(0); await _sqlImporter.StartImport(View.MongoDbConnectionString, View.SqlConnectionString, accounts, progress); }