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); }
public IActionResult EditComment([FromBody] EditPostCommentCommand comment) { return(Ok(_postCommentsService.EditComment(comment))); }