public bool Post([FromBody] PalindromeDTO palindrome)
        {
            char[] charArray = palindrome.Name.ToCharArray();
            Array.Reverse(charArray);
            string result = new string(charArray);

            if (result.ToUpper() == palindrome.Name.ToUpper())
            {
                return(_palindromeReporitory.Save(palindrome));
            }
            else
            {
                return(false);
            }
        }
Esempio n. 2
0
 public bool Post([FromBody] PalindromeDTO palindrome)
 {
     return(_palindromeReporitory.Save(palindrome));
 }