public IEnumerable<CommentServiceModel> getCommentsByKeyword(string text) { CommentsRepository repo = new CommentsRepository(entities); List<CommentServiceModel> models = new List<CommentServiceModel>(); IEnumerable<Comment> comments = repo.FindCommentsByKeyword(text); foreach (Comment comment in comments) { models.Add(DefectUtil.mapCommentEntityToModel(comment)); } return models; }