public async Task <IActionResult> GetAssociations(string word) { if (string.IsNullOrEmpty(word)) { return(Ok("No word parameter")); } var list = await _StatisticsRepository.GetAssociations(word); if (list == null || list.Count <= 0) { return(NotFound("Nothing matched the query")); } var model = list.Select(x => CreateAssociationsListModel(x)); return(Ok(model)); }