public async void Update(EmbeddedBlog blog)
        {
            string commentId = Guid.NewGuid().ToString();

            blog.Comments.Add(new Comment
            {
                CommentId = commentId,
                Id        = commentId,
                Details   = "never read a post like this",
                Likes     = 1
            });
            await _blogsRepository.AddOrUpdateAsync(blog, blog.Type);

            // Console.WriteLine();
        }
示例#2
0
 public async void UpdateComment(Comment comment)
 {
     comment.Details = TextHelper.OneMBText;
     //Console.WriteLine();
     await _commentsRepository.AddOrUpdateAsync(comment, comment.BlogId);
 }
示例#3
0
 public async void UpdateBlog(Blog blog)
 {
     blog.Content = TextHelper.OneMBText;
     // Console.WriteLine();
     await _blogsRepository.AddOrUpdateAsync(blog, blog.Type);
 }