public T_CommentVoteViewModel(T_CommentVote m, bool convertSubs = false) { if (m != null) { this.ID = m.ID; this.Vote = m.Vote; this.IP = m.IP; this.CommentID = m.CommentID; this.T_Comment = convertSubs ? new T_CommentViewModel(m.T_Comment) : null; } }
public override BaseViewModel <T_CommentVote> FromModel <M>(M mo, bool convertSubs) { var m = mo as T_CommentVote; if (m != null) { this.ID = m.ID; this.Vote = m.Vote; this.IP = m.IP; this.CommentID = m.CommentID; this.T_Comment = convertSubs ? new T_CommentViewModel(m.T_Comment) : null; } return(this); }