/// <summary> /// Constructor /// </summary> /// <param name="comment">CreateComment method.</param> public CommentModel(CreateComment comment) { this.Comments = comment.Comments; this.PostID = comment.HeadID; this.ReplyID = (comment.IsReply ? comment.ID : -1); this.AddComment = true; }
/// <summary> /// Construcotr /// </summary> /// <param name="comment">CreateComment object.</param> public ViewLeftSideModel(CreateComment comment) { this.ID = comment.ID; this.HeadID = comment.HeadID; this.UpVotes = comment.UpVotes; this.DownVotes = comment.DownVotes; this.HasSolution = comment.HasSolution; this.IsSolution = false; this.IsReply = comment.IsReply; this.PostAuthor = comment.Author.ToLower(); this.Author = comment.Author.ToLower(); }