Skip to content

Commit dc368aa

Browse files
committed
Fixed the 2 failing Integration Tests.
1 parent eb52053 commit dc368aa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

RepoDb.Core/RepoDb/StatementBuilders/BaseStatementBuilder.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ public virtual string CreateInsert(string tableName,
365365
// Primary Key
366366
if (primaryField != null &&
367367
primaryField.HasDefaultValue == false &&
368-
!string.Equals(primaryField.Name, identityField.Name, StringComparison.OrdinalIgnoreCase))
368+
!string.Equals(primaryField.Name, identityField?.Name, StringComparison.OrdinalIgnoreCase))
369369
{
370370
var isPresent = fields
371371
.FirstOrDefault(f =>
@@ -443,7 +443,7 @@ public virtual string CreateInsertAll(string tableName,
443443
// Primary Key
444444
if (primaryField != null &&
445445
primaryField.HasDefaultValue == false &&
446-
!string.Equals(primaryField.Name, identityField.Name, StringComparison.OrdinalIgnoreCase))
446+
!string.Equals(primaryField.Name, identityField?.Name, StringComparison.OrdinalIgnoreCase))
447447
{
448448
var isPresent = fields
449449
.FirstOrDefault(f =>

0 commit comments

Comments
 (0)