diff --git a/src/EFCore.Proxies/Proxies/Internal/ProxyChangeTrackingConvention.cs b/src/EFCore.Proxies/Proxies/Internal/ProxyChangeTrackingConvention.cs index beece7e93eb..75430b08dd8 100644 --- a/src/EFCore.Proxies/Proxies/Internal/ProxyChangeTrackingConvention.cs +++ b/src/EFCore.Proxies/Proxies/Internal/ProxyChangeTrackingConvention.cs @@ -43,7 +43,7 @@ public virtual void ProcessModelInitialized( { modelBuilder.HasChangeTrackingStrategy(ChangeTrackingStrategy.ChangingAndChangedNotifications); #pragma warning disable EF1001 // Internal EF Core API usage. - modelBuilder.HasAnnotation(CoreAnnotationNames.SkipChangeTrackingStrategyValidationAnnotation, "true"); + modelBuilder.HasAnnotation(CoreAnnotationNames.FullChangeTrackingNotificationsRequiredAnnotation, "true"); #pragma warning restore EF1001 // Internal EF Core API usage. } } diff --git a/src/EFCore/Infrastructure/ModelValidator.cs b/src/EFCore/Infrastructure/ModelValidator.cs index f021e1665ab..187f7565e77 100644 --- a/src/EFCore/Infrastructure/ModelValidator.cs +++ b/src/EFCore/Infrastructure/ModelValidator.cs @@ -687,7 +687,7 @@ protected virtual void ValidateChangeTrackingStrategy( { Check.NotNull(model, nameof(model)); - var requireFullNotifications = (string)model[CoreAnnotationNames.SkipChangeTrackingStrategyValidationAnnotation] == "true"; + var requireFullNotifications = (string)model[CoreAnnotationNames.FullChangeTrackingNotificationsRequiredAnnotation] == "true"; foreach (var entityType in model.GetEntityTypes()) { var errorMessage = entityType.AsEntityType().CheckChangeTrackingStrategy( diff --git a/src/EFCore/Metadata/Internal/CoreAnnotationNames.cs b/src/EFCore/Metadata/Internal/CoreAnnotationNames.cs index e170f185413..fa432b93906 100644 --- a/src/EFCore/Metadata/Internal/CoreAnnotationNames.cs +++ b/src/EFCore/Metadata/Internal/CoreAnnotationNames.cs @@ -271,7 +271,7 @@ public static class CoreAnnotationNames /// 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 const string SkipChangeTrackingStrategyValidationAnnotation = "ModelValidator.SkipChangeTrackingStrategyValidation"; + public const string FullChangeTrackingNotificationsRequiredAnnotation = "ModelValidator.FullChangeTrackingNotificationsRequired"; /// /// This is an internal API that supports the Entity Framework Core infrastructure and not subject to @@ -316,7 +316,7 @@ public static class CoreAnnotationNames DuplicateServiceProperties, AmbiguousField, SkipDetectChangesAnnotation, - SkipChangeTrackingStrategyValidationAnnotation + FullChangeTrackingNotificationsRequiredAnnotation }; } } diff --git a/src/EFCore/Metadata/Internal/EntityType.cs b/src/EFCore/Metadata/Internal/EntityType.cs index 58e9c32e9b5..47ea1f077af 100644 --- a/src/EFCore/Metadata/Internal/EntityType.cs +++ b/src/EFCore/Metadata/Internal/EntityType.cs @@ -3069,7 +3069,7 @@ public virtual void AddData([NotNull] IEnumerable data) { if (changeTrackingStrategy != null) { - var requireFullNotifications = (string)Model[CoreAnnotationNames.SkipChangeTrackingStrategyValidationAnnotation] == "true"; + var requireFullNotifications = (string)Model[CoreAnnotationNames.FullChangeTrackingNotificationsRequiredAnnotation] == "true"; var errorMessage = CheckChangeTrackingStrategy(changeTrackingStrategy.Value, requireFullNotifications); if (errorMessage != null) { diff --git a/src/EFCore/Properties/CoreStrings.Designer.cs b/src/EFCore/Properties/CoreStrings.Designer.cs index cac167f057b..799af263efe 100644 --- a/src/EFCore/Properties/CoreStrings.Designer.cs +++ b/src/EFCore/Properties/CoreStrings.Designer.cs @@ -981,7 +981,7 @@ public static string ForeignKeyWrongType([CanBeNull] object foreignKey, [CanBeNu foreignKey, key, principalType, entityType, otherEntityType); /// - /// The entity type '{entityType}' is configured to use the '{changeTrackingStrategy}' change tracking strategy when full change tracking notifications are required. Configure all entity types in the model to use the '{fullStrategy}' or '{fullPlusStrategy}' strategy. + /// The entity type '{entityType}' is configured to use the '{changeTrackingStrategy}' change tracking strategy when full change tracking notifications are required. Use 'ModelBuilder.HasChangeTrackingStrategy' in 'OnModelCreating' to configure all entity types in the model to use the '{fullStrategy}' or '{fullPlusStrategy}' strategy. /// public static string FullChangeTrackingRequired([CanBeNull] object entityType, [CanBeNull] object changeTrackingStrategy, [CanBeNull] object fullStrategy, [CanBeNull] object fullPlusStrategy) => string.Format( diff --git a/src/EFCore/Properties/CoreStrings.resx b/src/EFCore/Properties/CoreStrings.resx index 422665c431c..61e499d3b3f 100644 --- a/src/EFCore/Properties/CoreStrings.resx +++ b/src/EFCore/Properties/CoreStrings.resx @@ -484,7 +484,7 @@ The foreign key {foreignKey} targeting the key {key} on '{principalType}' cannot be removed from the entity type '{entityType}' because it is defined on the entity type '{otherEntityType}'. - The entity type '{entityType}' is configured to use the '{changeTrackingStrategy}' change tracking strategy when full change tracking notifications are required. Configure all entity types in the model to use the '{fullStrategy}' or '{fullPlusStrategy}' strategy. + The entity type '{entityType}' is configured to use the '{changeTrackingStrategy}' change tracking strategy when full change tracking notifications are required. Use 'ModelBuilder.HasChangeTrackingStrategy' in 'OnModelCreating' to configure all entity types in the model to use the '{fullStrategy}' or '{fullPlusStrategy}' strategy. The '{methodName}' method is not supported because the query has switched to client-evaluation. Inspect the log to determine which query expressions are triggering client-evaluation.