Skip to content

Commit 51faf6e

Browse files
committed
Fix NpgsqlCharacterStringTypeMapping for compiled model
Fixed in main in #3089 Fixes #2974
1 parent e3a6f37 commit 51faf6e

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

src/EFCore.PG/Storage/Internal/Mapping/NpgsqlCharacterStringTypeMapping.cs

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,13 @@ protected override void ConfigureParameter(DbParameter parameter)
122122
base.ConfigureParameter(parameter);
123123
}
124124

125-
private static bool EqualsWithoutTrailingWhitespace(string? a, string? b)
125+
/// <summary>
126+
/// This is an internal API that supports the Entity Framework Core infrastructure and not subject to
127+
/// the same compatibility standards as public APIs. It may be changed or removed without notice in
128+
/// any release. You should only use it directly in your code with extreme caution and knowing that
129+
/// doing so can result in application failures when updating to a new Entity Framework Core release.
130+
/// </summary>
131+
public static bool EqualsWithoutTrailingWhitespace(string? a, string? b)
126132
=> (a, b) switch
127133
{
128134
(null, null) => true,
@@ -131,6 +137,12 @@ private static bool EqualsWithoutTrailingWhitespace(string? a, string? b)
131137
_ => a.AsSpan().TrimEnd().SequenceEqual(b.AsSpan().TrimEnd())
132138
};
133139

134-
private static int GetHashCodeWithoutTrailingWhitespace(string a)
140+
/// <summary>
141+
/// This is an internal API that supports the Entity Framework Core infrastructure and not subject to
142+
/// the same compatibility standards as public APIs. It may be changed or removed without notice in
143+
/// any release. You should only use it directly in your code with extreme caution and knowing that
144+
/// doing so can result in application failures when updating to a new Entity Framework Core release.
145+
/// </summary>
146+
public static int GetHashCodeWithoutTrailingWhitespace(string a)
135147
=> a.TrimEnd().GetHashCode();
136148
}

0 commit comments

Comments
 (0)