Example #1
0
        public ActionResult SyncItem(int itemid, bool ResetQuestions)
        {
            string baseUrl = HttpRuntime.AppDomainAppPath;
            string jsonUrl = baseUrl + jsonName;
            var    qnaList = new List <QnAItem>();
            var    qnaItem = RequestHandler.FetchQnaItem(itemid, jsonUrl);

            qnaList.Add(qnaItem);
            //var qnaService = new QnASyncService(ConfigurationManager.AppSettings["QnaMakerKnowledgebaseId"], ConfigurationManager.AppSettings["QnAMakerSubscriptionKey"], "QnASyncTesting");
            var qnaService = new QnASyncService("07fbe223-9502-44d9-b762-d0164cd678e2", ConfigurationManager.AppSettings["QnAMakerSubscriptionKey"], "QnAManual");

            qnaService.UpdateKnowlegdeBaseSingleItem(qnaList, ResetQuestions);
            return(RedirectToAction("Index"));
        }