public static DisplayCommentViewModel MapToDisplayComment(Comment comment, string userName) { DisplayCommentViewModel commentVM = new DisplayCommentViewModel(); commentVM.Id = comment.Id; commentVM.Text = comment.Text; commentVM.Likes = comment.Likes; commentVM.DisLikes = comment.DisLikes; commentVM.CanDelete = false; commentVM.UserName = userName; return commentVM; }
public static DisplayCommentViewModel MapToDisplayComment(Comment comment, string userName, bool canDelete) { DisplayCommentViewModel commentVM = MapToDisplayComment(comment, userName); commentVM.CanDelete = canDelete; return commentVM; }