private async Task loadPageAsync() { try { areaData = await QualityManager.GetAreaDataAsync(area.Id); } catch (Exception ex) { throw ex; } imgArea.Source = ImageSource.FromStream(() => new HttpClient().GetStreamAsync(areaData.imgMobile).Result); lblName.Text = areaData.Name; lblMayor.Text = areaData.Mayor; lblFullName.Text = areaData.FullName; lblContinent.Text = areaData.Continent; }
private async Task testModelsAsync() { List <Area> areas = await QualityManager.GetAreasAsync(); foreach (Area area in areas) { Debug.WriteLine($"naam: {area.Name}"); } AreaData areaData = await QualityManager.GetAreaDataAsync("744daf84-8b6d-4d50-9231-0f4a601f06af"); Debug.WriteLine($"Naam: {areaData.Name}, Land: {areaData.FullName}, Burgemeester: {areaData.Mayor}"); List <QualityScore> qualityScore = await QualityManager.GetQualityScoresAsync("744daf84-8b6d-4d50-9231-0f4a601f06af"); foreach (QualityScore qs in qualityScore) { Debug.WriteLine($"label: {qs.Topic}, score: {qs.ScoreOutOf10.ToString()}"); qs.ScoreOutOf10 = 7; QualityManager.UpdateQualityScoreAsync(qs); } }