Skip to content

Commit 56a26e4

Browse files
author
Henk Kin
committed
Changed mappinghint usage
1 parent a948a1b commit 56a26e4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Identifiers.EntityFrameworkCore.SqlServer/IdentifierValueConverter.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ public IdentifierValueConverter(ConverterMappingHints mappingHints = null)
99
: base(
1010
id => id.GetValue() == null ? default : (TDatabaseClrType)Convert.ChangeType(id.GetValue(), typeof(TDatabaseClrType)),
1111
value => new Identifier(value),
12-
new ConverterMappingHints(valueGeneratorFactory: (p, t) => new IdentifierValueGenerator<TDatabaseClrType>())
12+
mappingHints == null
13+
? new ConverterMappingHints(valueGeneratorFactory: (p, t) => new IdentifierValueGenerator<TDatabaseClrType>())
14+
: mappingHints.With(new ConverterMappingHints(valueGeneratorFactory: (p, t) => new IdentifierValueGenerator<TDatabaseClrType>()))
1315
)
1416
{ }
1517
}

0 commit comments

Comments
 (0)