private void ImportFromExcel(object sender, DoWorkEventArgs e) { isImporting = true; foreach (InputEntityViewModel entity in entitiesToImport) { ExcelImporter.ImportDataFomExcel(entity.Name); entity.WasImported = true; } }