From f2d9b52355cd477b121d9bb3b013fc29346a5260 Mon Sep 17 00:00:00 2001 From: Stuart Turner Date: Sat, 4 Jun 2022 13:45:45 -0500 Subject: [PATCH] Fix bug in pluralization code --- Source/Pluralization.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Pluralization.cs b/Source/Pluralization.cs index ce2d6f0..a02f66c 100644 --- a/Source/Pluralization.cs +++ b/Source/Pluralization.cs @@ -26,7 +26,7 @@ namespace LinqToDB.LINQPad var word = GetLastWord(str); var newWord = word.Pluralize(); - if (string.Equals(word, newWord, StringComparison.OrdinalIgnoreCase)) + if (!string.Equals(word, newWord, StringComparison.OrdinalIgnoreCase)) { if (char.IsUpper(word[0])) newWord = char.ToUpper(newWord[0]) + newWord.Substring(1, newWord.Length - 1); @@ -46,7 +46,7 @@ namespace LinqToDB.LINQPad var word = GetLastWord(str); var newWord = word.Singularize(); - if (string.Equals(word, newWord, StringComparison.OrdinalIgnoreCase)) + if (!string.Equals(word, newWord, StringComparison.OrdinalIgnoreCase)) { if (char.IsUpper(word[0])) newWord = char.ToUpper(newWord[0]) + newWord.Substring(1, newWord.Length - 1);