public async Task <string> GetAlbumIdAsync() { var album = ambientFuckeryDatabase.Query <Album>().SingleOrDefault(); if (album != null) { return(album.Id); } album = await CreateAlbumAsync(); ambientFuckeryDatabase.Insert(album); return(album.Id); }
private async Task <GoogleCredentials> GetCredentialsAsync() { var credentials = database.Query <GoogleCredentials>().FirstOrDefault(); if (credentials != null) { return(credentials); } credentials = await PerformOAuthAsync(); database.Insert(credentials); return(credentials); }