private Dictionary<string, object> GenerateQuestionDictionary(Question question)
 {
     return new Dictionary<string, object>
         {
             {"description", question.Description},
             {"correctQuery", question.CorrectQuery},
             {"identifier", question.Identify()},
             {"expectedAnswer", InteractiveSqlJson.QueryResultToJson(m_QuestionAnswers[question.Identify()])}
         };
 }
 private LogEvent LogEventForAnswer(Question question, Answer answer, AnswerResult answerResult)
 {
     return LogEvent
         .OfSeverity(Severity.Info)
         .Add("site", "learnsomesql.com")
         .Add("eventName", "submittedAnswer")
         .Add("question", question.Description)
         .Add("correctQuery", question.CorrectQuery)
         .Add("submittedQuery", answer.Query)
         .Add("isCorrect", answerResult.IsCorrect);
 }
예제 #3
0
 private QueryResultTable Answer(Question question)
 {
     return m_SqlExecutor
         .ExecuteQuery(question.CorrectQuery)
         .ExpectSuccess();
 }