public async Task GetInfo(IDialogContext context, LuisResult result) { if (!isReply(context, result)) { EntityRecommendation InfoType; if (result.TryFindEntity("InfoType", out InfoType)) { KnowledgeBase kb = new KnowledgeBase(); if (InfoType.Entity.Contains("ox")) { await context.PostAsync(kb.GetArticle("KB0010016")); } else if (InfoType.Entity.Contains("rive")) { await context.PostAsync(kb.GetArticle("KB0010017")); } else if (InfoType.Entity.Contains("pproval")) { Approvals approvals = new Approvals(); await approvals.GetPending(context); } else { await context.PostAsync("Sorry. I couldn't find any article related to your question."); } } else { await context.PostAsync("Sorry. I couldn't find any article related to your question."); } } context.Wait(MessageReceived); }