Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
 public async void RefreshContextAsync()
 {
     Authors = await repository.GetAuthorsAsync();
 }