コード例 #1
0
        public PostComments EditComment(EditPostCommentCommand comment)
        {
            var commentToUptade = _paintStoreContext.PostComments.First(x => x.Id == comment.Id);

            commentToUptade.Content = comment.Content;
            commentToUptade.Edited  = true;
            _paintStoreContext.SaveChanges();
            return(commentToUptade);
        }
コード例 #2
0
 public IActionResult EditComment([FromBody] EditPostCommentCommand comment)
 {
     return(Ok(_postCommentsService.EditComment(comment)));
 }