public ActionResult NearPhrases(int id) { var phraseProvider = new PhraseProvider(); var phrases = phraseProvider.GetNearPhrasesEntityModel(CurrentUser.AccountID, id, SourceType.Context); var phraseDomains = phraseProvider.GetDomainsStatsForPhraseIds(phrases.Select(ph => ph.PhraseID).ToArray()); return View(new NearPhraseStatsModel(GetBaseModel(), phraseDomains, phrases)); }
public ActionResult ExportNearPhrases(int id) { var phraseProvider = new PhraseProvider(); var phrases = phraseProvider.GetNearPhrasesEntityModel(CurrentUser.AccountID, id, SourceType.Context); var phraseDomains = phraseProvider.GetDomainsStatsForPhraseIds(phrases.Select(ph => ph.PhraseID).ToArray()); return SearchPhraseController.BuildExportCsv(phraseDomains, phrases.FirstOrDefault()?.Text ?? "empty"); }