public IEnumerable<CommentServiceModel> getCommentsBeforeDate(DateTime dateTimeStamp) { CommentsRepository repo = new CommentsRepository(entities); List<CommentServiceModel> models = new List<CommentServiceModel>(); IEnumerable<Comment> comments = repo.FindAllCommentsBeforeDate(dateTimeStamp); foreach (Comment comment in comments) { models.Add(DefectUtil.mapCommentEntityToModel(comment)); } return models; }