public async Task <ActionResult <string> > GetKnownAnagramsAsync([FromQuery] string w) { if (w is null) { return(BadRequest()); } AnagramChecker anagramChecker = new AnagramChecker(); IEnumerable <string> anagrams = await anagramChecker.GetKnownAnagramsAsync(w); if (anagrams.Count() == 0) { _logger.LogWarning("No anagrams found for " + w + ". This must not nescessary mean that there are no anagrams, but none of them is included in our dictionary as anagram of the inputed word"); return(NotFound()); } else { return(Ok(anagrams)); } }