public async Task <IEnumerable <DataTableModel> > GetDataTableAsync() { await Task.Factory.StartNew(async() => { albums = await httpAlbumHandler.GetResultsAsync(); photos = await httpPhotoHandler.GetResultsAsync(); }).GetAwaiter().GetResult(); return(albums.SelectMany(a => photos.Where(p => p.AlbumId == a.Id).Select(v => new DataTableModel() { AlbumName = a.Title, PhotoTitle = v.Title, Thumbnail = v.ThumbnailUrl, Url = v.Url }))); }