Exemplo n.º 1
0
        public List <UserCommentVM> GetComments(Guid postID)
        {
            List <UserCommentVM> ls = new List <UserCommentVM>();

            foreach (var c in commentBLL.GetCommentsByPostID(postID))
            {
                User u = userBLL.Get(c.UserID.Value);
                ls.Add(new UserCommentVM {
                    CommentID   = c.ID,
                    FullName    = u.FirstName + " " + u.LastName,
                    UserProfile = profileImageBLL.GetProfileImageByUserID(u.ID).Image.Base64,
                    CommentText = c.TextContent
                });
            }
            return(ls);
        }