public async Task None(IDialogContext context, LuisResult result) { var textAnalyticsClient = new TextAnalyticsClient(ConfigurationManager.AppSettings["CognitiveServices_TextAnalyticsKey"]); var sentiment = await textAnalyticsClient.GetSentimentForTextAsync(result.Query); // attempt to obtain applicant info var a = await ApplicantFactory.GetApplicantByContext(context); var app = a.Applications.First().Value; app.SentimentData.Add(new Common.Models.Sentiment() { AdvisorContacted = false, SentimentScore = sentiment, SentimentTaken = DateTime.Now }); await ApplicantFactory.PersistApplicant(a); if (sentiment < 0.45) { PromptDialog.Text(context, ResumeAfterEmailPromptAsync, string.Format("I'm sorry to hear that. Would you like me to email your recruiter, {0}, so that you can discuss the matter?", app.Recrutier.Name)); } else if (sentiment >= 0.45 && sentiment <= 0.75) { await context.PostAsync(string.Format("Ok. Contact your recruiter, {0}, if there is anything you would like to discuss regarding your placement.", app.Recrutier.Name)); context.Done <string>(null); } else { await context.PostAsync("Great! That's good to hear. I'll check back in with you toward the end of your contract."); context.Done <string>(null); } }