diff --git a/src/EFCore/ChangeTracking/Internal/ArrayPropertyValues.cs b/src/EFCore/ChangeTracking/Internal/ArrayPropertyValues.cs index f789dd4538c..80e263b4b5b 100644 --- a/src/EFCore/ChangeTracking/Internal/ArrayPropertyValues.cs +++ b/src/EFCore/ChangeTracking/Internal/ArrayPropertyValues.cs @@ -132,8 +132,8 @@ public override object? this[string propertyName] /// public override object? this[IProperty property] { - get => _values[EntityType.CheckPropertyBelongsToType(property).GetIndex()]; - set => SetValue(EntityType.CheckPropertyBelongsToType(property).GetIndex(), value); + get => _values[EntityType.CheckContains(property).GetIndex()]; + set => SetValue(EntityType.CheckContains(property).GetIndex(), value); } /// diff --git a/src/EFCore/ChangeTracking/Internal/CurrentPropertyValues.cs b/src/EFCore/ChangeTracking/Internal/CurrentPropertyValues.cs index bac837c979e..d8d57b01959 100644 --- a/src/EFCore/ChangeTracking/Internal/CurrentPropertyValues.cs +++ b/src/EFCore/ChangeTracking/Internal/CurrentPropertyValues.cs @@ -40,7 +40,7 @@ public override TValue GetValue(string propertyName) /// doing so can result in application failures when updating to a new Entity Framework Core release. /// public override TValue GetValue(IProperty property) - => InternalEntry.GetCurrentValue(InternalEntry.EntityType.CheckPropertyBelongsToType(property)); + => InternalEntry.GetCurrentValue(InternalEntry.EntityType.CheckContains(property)); /// /// This is an internal API that supports the Entity Framework Core infrastructure and not subject to diff --git a/src/EFCore/ChangeTracking/Internal/EntryPropertyValues.cs b/src/EFCore/ChangeTracking/Internal/EntryPropertyValues.cs index 71ec8147e26..5591ded3f24 100644 --- a/src/EFCore/ChangeTracking/Internal/EntryPropertyValues.cs +++ b/src/EFCore/ChangeTracking/Internal/EntryPropertyValues.cs @@ -130,8 +130,8 @@ public override object? this[string propertyName] /// public override object? this[IProperty property] { - get => GetValueInternal(EntityType.CheckPropertyBelongsToType(property)); - set => SetValueInternal(EntityType.CheckPropertyBelongsToType(property), value); + get => GetValueInternal(EntityType.CheckContains(property)); + set => SetValueInternal(EntityType.CheckContains(property), value); } /// diff --git a/src/EFCore/ChangeTracking/Internal/OriginalPropertyValues.cs b/src/EFCore/ChangeTracking/Internal/OriginalPropertyValues.cs index faa4d63138d..302df0ab572 100644 --- a/src/EFCore/ChangeTracking/Internal/OriginalPropertyValues.cs +++ b/src/EFCore/ChangeTracking/Internal/OriginalPropertyValues.cs @@ -40,7 +40,7 @@ public override TValue GetValue(string propertyName) /// doing so can result in application failures when updating to a new Entity Framework Core release. /// public override TValue GetValue(IProperty property) - => InternalEntry.GetOriginalValue(InternalEntry.EntityType.CheckPropertyBelongsToType(property)); + => InternalEntry.GetOriginalValue(InternalEntry.EntityType.CheckContains(property)); /// /// This is an internal API that supports the Entity Framework Core infrastructure and not subject to diff --git a/src/EFCore/Metadata/Internal/EntityTypeExtensions.cs b/src/EFCore/Metadata/Internal/EntityTypeExtensions.cs index 8f6c79d5759..42c1b0cda1a 100644 --- a/src/EFCore/Metadata/Internal/EntityTypeExtensions.cs +++ b/src/EFCore/Metadata/Internal/EntityTypeExtensions.cs @@ -303,7 +303,7 @@ public static IEnumerable FindDerivedNavigations( /// any release. You should only use it directly in your code with extreme caution and knowing that /// doing so can result in application failures when updating to a new Entity Framework Core release. /// - public static IProperty CheckPropertyBelongsToType( + public static IProperty CheckContains( this IEntityType entityType, IProperty property) {