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); } }
public bool Post([FromBody] PalindromeDTO palindrome) { return(_palindromeReporitory.Save(palindrome)); }