I've got a Sqlite database which I populate inside a Windows Store app. Now I'd like to have said database availiable when reinstalling the app, therefore I have to add it to my project as a file, if I'm right.
Now I'm trying to export the database file using the PickSaveFileAsync()-Method. Unfortunately I don't really know how to go about this once I've got the file. Here's what I've got so far:
private async void exportDB_Click(object sender, RoutedEventArgs e)
{
StorageFile database = await ApplicationData.Current.LocalFolder.GetFileAsync("Hashes.db");
var picker = new FileSavePicker();
picker.FileTypeChoices.Add("Database File", new string[] { ".db" });
picker.CommitButtonText = "Save DB";
picker.SuggestedFileName = "Database";
StorageFile file = await picker.PickSaveFileAsync();
if (file != null)
{
// What to do here?
}
}