public async void RefreshContextAsync() { var previousSelectedBlogPostId = SelectedBlogPost?.Id; BlogPosts = await repository.GetBlogPostsAsync(); Authors = await repository.GetAuthorsAsync(); SelectedBlogPost = BlogPosts.FirstOrDefault(blogPost => previousSelectedBlogPostId.HasValue && blogPost.Id == previousSelectedBlogPostId.Value); }
public async void RefreshContextAsync() { Authors = await repository.GetAuthorsAsync(); }