Example #1
0
        public IEnumerable<CommentServiceModel> getCommentsByUser(int id)
        {
            CommentsRepository repo = new CommentsRepository(entities);
            List<CommentServiceModel> models = new List<CommentServiceModel>();
            IEnumerable<Comment> comments = repo.FindAllCommentsForDefect(id);

            foreach (Comment comment in comments) {
                models.Add(DefectUtil.mapCommentEntityToModel(comment));
            }

            return models;
        }