Exemplo n.º 1
0
        public CommentBlock FindAllProductComments(long productId, int startIndex = 0, int count = 20)
        {
            List <Comment> comments = CommentDao.FindByProductIdOrderByDeliveryDate(productId, startIndex, count + 1);

            bool existMoreComments = (comments.Count == count + 1);

            if (existMoreComments)
            {
                comments.RemoveAt(count);
            }

            return(new CommentBlock(comments, existMoreComments));
        }