public FriendViewModel(Friends friends, PostViewModel postViewModel) { this.friends = friends; this.postViewModel = postViewModel; _friendPosts = new ObservableCollection <Post>(); friendService = new FriendService(); _friendPosts = Task.Run(async() => await friendService.GetPostsWithID(this.friends, postViewModel)).Result; }