diff --git a/src/EFCore.PG/Storage/Internal/Mapping/NpgsqlCharacterStringTypeMapping.cs b/src/EFCore.PG/Storage/Internal/Mapping/NpgsqlCharacterStringTypeMapping.cs index ca0a3095e..5df6a7219 100644 --- a/src/EFCore.PG/Storage/Internal/Mapping/NpgsqlCharacterStringTypeMapping.cs +++ b/src/EFCore.PG/Storage/Internal/Mapping/NpgsqlCharacterStringTypeMapping.cs @@ -122,7 +122,13 @@ protected override void ConfigureParameter(DbParameter parameter) base.ConfigureParameter(parameter); } - private static bool EqualsWithoutTrailingWhitespace(string? a, string? b) + /// + /// This is an internal API that supports the Entity Framework Core infrastructure and not subject to + /// the same compatibility standards as public APIs. It may be changed or removed without notice in + /// any release. You should only use it directly in your code with extreme caution and knowing that + /// doing so can result in application failures when updating to a new Entity Framework Core release. + /// + public static bool EqualsWithoutTrailingWhitespace(string? a, string? b) => (a, b) switch { (null, null) => true, @@ -131,6 +137,12 @@ private static bool EqualsWithoutTrailingWhitespace(string? a, string? b) _ => a.AsSpan().TrimEnd().SequenceEqual(b.AsSpan().TrimEnd()) }; - private static int GetHashCodeWithoutTrailingWhitespace(string a) + /// + /// This is an internal API that supports the Entity Framework Core infrastructure and not subject to + /// the same compatibility standards as public APIs. It may be changed or removed without notice in + /// any release. You should only use it directly in your code with extreme caution and knowing that + /// doing so can result in application failures when updating to a new Entity Framework Core release. + /// + public static int GetHashCodeWithoutTrailingWhitespace(string a) => a.TrimEnd().GetHashCode(); }