public async Task StartQuiz(int userId, string domain) { UserInfo userInfo = new UserInfo(); userInfo.UserId = userId; userInfo.DomainName = domain; _userQuizState.Add(Context.ConnectionId, userInfo); bool IsDomainExist = _graphService.IsDomainExist(domain); Console.WriteLine(IsDomainExist); //if (IsDomainExist != true) //{ // var ConceptAndConceptToQuestionMap = await _iquizEngineService.GetConceptAndConceptToQuestionMap(domain); // var stringForm = JsonConvert.SerializeObject(ConceptAndConceptToQuestionMap); // var ConceptMapandConcepttoQuestionMap = JArray.Parse(stringForm); // var version = ConceptMapandConcepttoQuestionMap[0]["version"]; // var domainForConceptGraph = ConceptMapandConcepttoQuestionMap[0]["domain"]; // List<Triplet> questionConceptTriplet = ConceptMapandConcepttoQuestionMap[0]["questionconceptTriplet"].ToObject<List<Triplet>>(); // List<ConceptMap> ConceptToConceptTriplet = ConceptMapandConcepttoQuestionMap[0]["concepttriplet"].ToObject<List<ConceptMap>>(); // var resul = _graphService.CreateConceptToQuestionMapping(questionConceptTriplet, (string)version, (string)domainForConceptGraph); // var resultOfConceptToConceptMapping = _graphService.CreateConceptToConceptMapping(ConceptToConceptTriplet, (string)domainForConceptGraph); //} bool IsUser = _graphService.IsUserExist(userInfo.UserId); if (IsUser != true) { _graphService.CreateUser(userInfo.UserId); } if (IsDomainExist) { List <string> QuestionsId = _graphService.GetQuestionsFromGraph(userInfo.UserId, userInfo.DomainName); Console.WriteLine("THIS IS THE " + JsonConvert.SerializeObject(QuestionsId)); userInfo.QuestionsFromQuestionBank = await _iquizEngineService.GetQuestionByIds(QuestionsId); } Console.WriteLine("THIS IS THE " + JsonConvert.SerializeObject(userInfo.QuestionsFromQuestionBank)); GetNextQuestion(null); }