Skip to content

Commit 4ed346c

Browse files
committed
Support NpgsqlUIntTypeMapping for the compiled model
Fixes npgsql#2992
1 parent adff7ad commit 4ed346c

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

src/EFCore.PG/Design/Internal/NpgsqlCSharpRuntimeAnnotationCodeGenerator.cs

+1
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ public override bool Create(
4949
var npgsqlDbTypeBasedDefaultInstance = typeMapping switch
5050
{
5151
NpgsqlStringTypeMapping => NpgsqlStringTypeMapping.Default,
52+
NpgsqlUIntTypeMapping => NpgsqlUIntTypeMapping.Default,
5253
NpgsqlULongTypeMapping => NpgsqlULongTypeMapping.Default,
5354
// NpgsqlMultirangeTypeMapping => NpgsqlMultirangeTypeMapping.Default,
5455
_ => (INpgsqlTypeMapping?)null

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

+8
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,14 @@ namespace Npgsql.EntityFrameworkCore.PostgreSQL.Storage.Internal.Mapping;
1010
/// </summary>
1111
public class NpgsqlUIntTypeMapping : NpgsqlTypeMapping
1212
{
13+
/// <summary>
14+
/// This is an internal API that supports the Entity Framework Core infrastructure and not subject to
15+
/// the same compatibility standards as public APIs. It may be changed or removed without notice in
16+
/// any release. You should only use it directly in your code with extreme caution and knowing that
17+
/// doing so can result in application failures when updating to a new Entity Framework Core release.
18+
/// </summary>
19+
public static NpgsqlUIntTypeMapping Default { get; } = new("xid", NpgsqlDbType.Xid);
20+
1321
/// <summary>
1422
/// This is an internal API that supports the Entity Framework Core infrastructure and not subject to
1523
/// the same compatibility standards as public APIs. It may be changed or removed without notice in

0 commit comments

Comments
 (0)