コード例 #1
0
        async Task LoadDataAsync()
        {
            var result = await _serieService.GetSeriesAsync();

            if (result != null)
            {
                foreach (Serie serie in result.Series)
                {
                    serie.Genrers = new List <Genrer>();
                    foreach (int genrer in serie.GenrersId)
                    {
                        try
                        {
                            serie.Genrers.Add(await _serieService.GetGenrerAsync(genrer));
                        }
                        catch (Exception e)
                        {
                            Console.WriteLine(e.Message);
                        }
                    }
                }
            }

            AddItens(result);
        }