示例#1
0
 public static Comment ToComment(CommentPostModel comment)
 {
     return(new Comment
     {
         Text = comment.Text,
         Important = comment.Important,
     });
 }
示例#2
0
        public void Post([FromBody] CommentPostModel comment)
        {
            User addedBy = userService.GetCurrentUser(HttpContext);

            commentService.Create(comment, addedBy);
        }