private async Task Load() { Profile profileFromAzure = null; try { profileFromAzure = await DataStore.GetItemAsync(LocalSettings.UserName); } catch (Exception) { } if (profileFromAzure == null) { Profile p = new Profile { UserId = "1", UserName = LocalSettings.UserName, PhotoBase64Encoded = "not set" }; await DataStore.AddItemAsync(p); } else { LocalSettings = new Settings { ID = 0, UserName = profileFromAzure.UserName, Photo = profileFromAzure.PhotoBase64Encoded }; } }