src/Shared/EntityFramework/Infrastructure/Pluralization/EnglishPluralizationService.cs
// <summary>
// captalize the return word if the parameter is capitalized
// if word is "Table", then return "Tables"
// </summary>
captalize the return word if the parameter is capitalized
if word is "Table", then return "Tables"
captalize the return word if the parameter is capitalized if word is " Table " then return " Tables "
private static string Capitalize(string word, Func<string, string> action)
        {
            var result = action(word);
            if (IsCapitalized(word))
            {
                if (result.Length == 0)
                {
                    return result;
                }
                var sb = new StringBuilder(result.Length);
                sb.Append(char.ToUpperInvariant(result[0]));
                sb.Append(result.Substring(1));
                return sb.ToString();
            }
            else
            {
                return result;
            }
        }
private static string Capitalize ( string word , Func < string , string > action ) { var result = action ( word ) ; if ( IsCapitalized ( word ) ) { if ( result . Length == 0 ) { return result ; } var sb = new StringBuilder ( result . Length ) ; sb . Append ( char . ToUpperInvariant ( result [ 0 ] ) ) ; sb . Append ( result . Substring ( 1 ) ) ; return sb . ToString ( ) ; } else { return result ; } }
captalize the return word if the parameter is capitalized
if word is "Table", then return "Tables"
captalize the return word if the parameter is capitalized if word is " Table " then return " Tables "
word
string
action
Func<string, string>