private async void ExportBrandButton_OnClick(object sender, RoutedEventArgs e) { var result = await _brandService.Export(); var dialog = new SaveFileDialog { FileName = "BrandExport.csv" }; if (dialog.ShowDialog() == true) { File.WriteAllText(dialog.FileName, result, Encoding.UTF8); Process.Start(dialog.FileName); } }