public static Comment ToComment(CommentPostModel comment) { return(new Comment { Text = comment.Text, Important = comment.Important, }); }
public void Post([FromBody] CommentPostModel comment) { User addedBy = userService.GetCurrentUser(HttpContext); commentService.Create(comment, addedBy); }