示例#1
0
        public List <CommentBL> GetAll(int articleId)
        {
            DALToBLMapper    poMapper       = new DALToBLMapper();
            List <Comment>   comment        = DAL.SDK.Kit.Instance.Comments.GetCommentsByArticleById(articleId);
            List <CommentBL> mappedComments = poMapper.MapCommentCollection(comment).ToList();

            return(mappedComments);
        }
示例#2
0
        public List <CommentBL> GetWithUsers(int articleId)
        {
            DALToBLMapper  poMapper = new DALToBLMapper();
            List <Comment> comments = DAL.SDK.Kit.Instance.Comments.GetCommentsByArticleById(articleId);

            for (int i = 0; i < comments.Count(); i++)
            {
                comments[i].User = DAL.SDK.Kit.Instance.Users.GetUserById(comments[i].IdUser);
            }
            List <CommentBL> mappedComments = poMapper.MapCommentCollection(comments).ToList();

            return(mappedComments);
        }