Exemplo n.º 1
0
        public IEnumerable <QuestionDto> SearchQuestions([FromBody] SearchQuestionsQuery query)
        {
            IEnumerable <QuestionDto> results = null;

            try
            {
                QuestionsRepository repository = new QuestionsRepository(_appDbContext);

                var questionDtos = repository.GetQuestionsByQuery(query, _clientData);

                results = repository.IncludeSkills(questionDtos);
            }
            catch (Exception e)
            {
                _log.LogError(e, "Error searching questions");
            }

            return(results);
        }