public IActionResult checkAnagram([FromBody] string w1, string w2) { if (anagramChecker.CheckIfAnagrams(w1, w2)) { return(Ok()); } else { return(BadRequest()); } }
static void CheckIfAnagrams(string firstWord, string secondWord) { if (anagramChecker.CheckIfAnagrams(firstWord, secondWord)) { Console.WriteLine("\"{0}\" and \"{1}\" are anagrams", firstWord, secondWord); } else { Console.WriteLine("\"{0}\" and \"{1}\" are no anagrams", firstWord, secondWord); } }