Skip to content

Commit bcbdb1f

Browse files
committed
Update based on review
1 parent 1ba536c commit bcbdb1f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/EFCore/Metadata/Conventions/ElementMappingConvention.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ void Validate(IConventionTypeBase typeBase)
4242
var typeMapping = Dependencies.TypeMappingSource.FindMapping((IProperty)property);
4343
if (typeMapping is { ElementTypeMapping: not null })
4444
{
45-
property.SetElementType(property.ClrType.TryGetElementType(typeof(IEnumerable<>)));
45+
property.Builder.SetElementType(property.ClrType.TryGetElementType(typeof(IEnumerable<>)));
4646
}
4747
}
4848

src/EFCore/Metadata/Conventions/ElementTypeChangedConvention.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public void ProcessPropertyElementTypeChanged(
3939
foreach (var foreignKey in key.GetReferencingForeignKeys())
4040
{
4141
var foreignKeyProperty = foreignKey.Properties[index];
42-
foreignKeyProperty.SetElementType(newElementType?.ClrType);
42+
foreignKeyProperty.Builder.SetElementType(newElementType?.ClrType);
4343
}
4444
}
4545
}
@@ -52,7 +52,7 @@ public void ProcessForeignKeyAdded(
5252
var principalKeyProperties = foreignKeyBuilder.Metadata.PrincipalKey.Properties;
5353
for (var i = 0; i < foreignKeyProperties.Count; i++)
5454
{
55-
foreignKeyProperties[i].SetElementType(principalKeyProperties[i].GetElementType()?.ClrType);
55+
foreignKeyProperties[i].Builder.SetElementType(principalKeyProperties[i].GetElementType()?.ClrType);
5656
}
5757
}
5858
}

0 commit comments

Comments
 (0)