示例#1
0
        public string Submission([FromBody] SubmissionRequest submissionRequest)
        {
            var reviewerId = _QuestionRepository.AddReviewer(submissionRequest.Reviewer);

            var commentList = new List <Comment>();

            foreach (var question in submissionRequest.Questions)
            {
                if (!string.IsNullOrEmpty(question.CommentText))
                {
                    commentList.Add(new Comment {
                        QuestionId = question.Id, ReviewerId = reviewerId, CommentText = question.CommentText
                    });
                }
            }

            _QuestionRepository.AddComments(commentList);

            return(commentList.Any(x => x.CommentText.ToLower().Contains("bizlibrary")) ? "EASTER-EGG-COMMENCE" : "");
        }