diff --git a/src/EFCore.Relational/Properties/RelationalStrings.Designer.cs b/src/EFCore.Relational/Properties/RelationalStrings.Designer.cs index bfeeb16ab4c..5991938abef 100644 --- a/src/EFCore.Relational/Properties/RelationalStrings.Designer.cs +++ b/src/EFCore.Relational/Properties/RelationalStrings.Designer.cs @@ -43,7 +43,7 @@ public static string CannotChangeWhenOpen => GetString("CannotChangeWhenOpen"); /// - /// Client side GroupBy is not supported. + /// The given GroupBy pattern is not translatable. Call AsEnumerable before GroupBy to evaluate it locally. /// public static string ClientGroupByNotSupported => GetString("ClientGroupByNotSupported"); @@ -1895,7 +1895,7 @@ public static EventDefinition LogMigrating([NotNull] IDiagnostic } /// - /// A MigrationAttribute isn't specified on the '{class}' class. + /// A [Migration] attribute isn't specified on the '{class}' class. /// public static EventDefinition LogMigrationAttributeMissingWarning([NotNull] IDiagnosticsLogger logger) { diff --git a/src/EFCore.Relational/Properties/RelationalStrings.resx b/src/EFCore.Relational/Properties/RelationalStrings.resx index 7f6aba94a19..a406425c9dd 100644 --- a/src/EFCore.Relational/Properties/RelationalStrings.resx +++ b/src/EFCore.Relational/Properties/RelationalStrings.resx @@ -127,7 +127,7 @@ The 'DbConnection' is currently in use. The connection can only be changed when the existing connection is not being used. - Client side GroupBy is not supported. + The given GroupBy pattern is not translatable. Call AsEnumerable before GroupBy to evaluate it locally. The column '{column}' on table {table} has unspecified computed column SQL. Specify the SQL before using EF Core to create the database schema. @@ -492,7 +492,7 @@ Debug RelationalEventId.MigrateUsingConnection string string - A MigrationAttribute isn't specified on the '{class}' class. + A [Migration] attribute isn't specified on the '{class}' class. Warning RelationalEventId.MigrationAttributeMissingWarning string diff --git a/src/EFCore/Properties/CoreStrings.Designer.cs b/src/EFCore/Properties/CoreStrings.Designer.cs index 471bbe878ed..7c866abd2e3 100644 --- a/src/EFCore/Properties/CoreStrings.Designer.cs +++ b/src/EFCore/Properties/CoreStrings.Designer.cs @@ -32,6 +32,14 @@ public static string AbstractLeafEntityType([CanBeNull] object entityType) GetString("AbstractLeafEntityType", nameof(entityType)), entityType); + /// + /// Cannot add an entity type with type '{typeName}' to the model as it is a dynamically-generated proxy type. + /// + public static string AddingProxyTypeAsEntityType([CanBeNull] object typeName) + => string.Format( + GetString("AddingProxyTypeAsEntityType", nameof(typeName)), + typeName); + /// /// The entity type '{entityType}' has a defining navigation and the supplied entity is currently referenced from several owner entities. To access the entry for a particular reference call '{targetEntryCall}' on the owner entry. /// @@ -89,7 +97,7 @@ public static string AmbiguousOwnedNavigation([CanBeNull] object entityTypeNavig entityTypeNavigationSpecification, otherEntityType); /// - /// The service property '{property}' of type '{serviceType}' cannot be added to the entity type '{entityType}' because there is another property of the same type. Ignore one of the properties using the NotMappedAttribute or 'EntityTypeBuilder.Ignore' in 'OnModelCreating'. + /// The service property '{property}' of type '{serviceType}' cannot be added to the entity type '{entityType}' because there is another property of the same type. Ignore one of the properties using the [NotMapped] attribute or 'EntityTypeBuilder.Ignore' in 'OnModelCreating'. /// public static string AmbiguousServiceProperty([CanBeNull] object property, [CanBeNull] object serviceType, [CanBeNull] object entityType) => string.Format( @@ -112,14 +120,6 @@ public static string ArgumentPropertyNull([CanBeNull] object property, [CanBeNul GetString("ArgumentPropertyNull", nameof(property), nameof(argument)), property, argument); - /// - /// Cannot add an entity type with type '{typeName}'. That type is a dynamically-generated proxy type. - /// - public static string AttemptToCreateEntityTypeBasedOnProxyClass([CanBeNull] object typeName) - => string.Format( - GetString("AttemptToCreateEntityTypeBasedOnProxyClass", nameof(typeName)), - typeName); - /// /// Cannot set backing field '{field}' for the indexer property '{entityType}.{property}'. Ensure no backing fields are specified for indexer properties. /// @@ -199,7 +199,7 @@ public static string CannotBeNullablePK([CanBeNull] object property, [CanBeNull] property, entityType); /// - /// Unable to convert queryable method to enumerable method. + /// Unable to convert queryable method to enumerable method. This is likely an issue in EF Core, please report it. /// public static string CannotConvertQueryableToEnumerableMethod => GetString("CannotConvertQueryableToEnumerableMethod"); @@ -389,7 +389,7 @@ public static string ComparerPropertyMismatch([CanBeNull] object type, [CanBeNul type, entityType, propertyName, propertyType); /// - /// There are multiple properties pointing to navigation '{1_entityType}.{0_navigation}'. To define composite foreign key using data annotations, use ForeignKeyAttribute on navigation. + /// There are multiple properties pointing to navigation '{1_entityType}.{0_navigation}'. To define composite foreign key using data annotations, use [ForeignKey] attribute on navigation. /// public static string CompositeFkOnProperty([CanBeNull] object navigation, [CanBeNull] object entityType) => string.Format( @@ -419,7 +419,7 @@ public static string ConflictingBackingFields([CanBeNull] object property, [CanB property, entityType, field1, field2); /// - /// There are multiple ForeignKeyAttributes which are pointing to same set of properties - '{propertyList}' on entity type '{entityType}'. + /// There are multiple [ForeignKey] attributes which are pointing to same set of properties - '{propertyList}' on entity type '{entityType}'. /// public static string ConflictingForeignKeyAttributes([CanBeNull] object propertyList, [CanBeNull] object entityType) => string.Format( @@ -579,7 +579,7 @@ public static string DerivedEntityTypeKey([CanBeNull] object derivedType, [CanBe derivedType, rootType); /// - /// The entity type '{entityType}' cannot have a defining query because it is derived from '{baseType}'. Only base keyless entity types can have a defining query. + /// The entity type '{entityType}' cannot have a defining query because it is derived from '{baseType}'. Only base entity types can have a defining query. /// public static string DerivedTypeDefiningQuery([CanBeNull] object entityType, [CanBeNull] object baseType) => string.Format( @@ -901,7 +901,7 @@ public static string FindValueTypeMismatch([CanBeNull] object index, [CanBeNull] index, entityType, valueType, propertyType); /// - /// The ForeignKeyAttribute for the navigation '{navigation}' cannot be specified on the entity type '{principalType}' since it represents a one-to-many relationship. Move the ForeignKeyAttribute to a property on '{dependentType}'. + /// The [ForeignKey] attribute for the navigation '{navigation}' cannot be specified on the entity type '{principalType}' since it represents a one-to-many relationship. Move the [ForeignKey] attribute to a property on '{dependentType}'. /// public static string FkAttributeOnNonUniquePrincipal([CanBeNull] object navigation, [CanBeNull] object principalType, [CanBeNull] object dependentType) => string.Format( @@ -909,7 +909,7 @@ public static string FkAttributeOnNonUniquePrincipal([CanBeNull] object navigati navigation, principalType, dependentType); /// - /// The ForeignKeyAttributes on property '{property}' and navigation '{navigation}' in entity type '{entityType}' do not point at each other. The value of ForeignKeyAttribute on property should be navigation name and the value of ForeignKeyAttribute on navigation should be the foreign key property name. + /// The [ForeignKey] attributes on property '{property}' and navigation '{navigation}' in entity type '{entityType}' do not point at each other. The value of [ForeignKey] attribute on property should be navigation name and the value of [ForeignKey] attribute on navigation should be the foreign key property name. /// public static string FkAttributeOnPropertyNavigationMismatch([CanBeNull] object property, [CanBeNull] object navigation, [CanBeNull] object entityType) => string.Format( @@ -1120,7 +1120,7 @@ public static string IndexWrongType([CanBeNull] object indexProperties, [CanBeNu indexProperties, entityType, otherEntityType); /// - /// The property '{property}' cannot be ignored on entity type '{entityType}', because it's declared on the base entity type '{baseEntityType}'. To exclude this property from your model, use NotMappedAttribute or Ignore method on the base type. + /// The property '{property}' cannot be ignored on entity type '{entityType}', because it's declared on the base entity type '{baseEntityType}'. To exclude this property from your model, use [NotMapped] attribute or Ignore method on the base type. /// public static string InheritedPropertyCannotBeIgnored([CanBeNull] object property, [CanBeNull] object entityType, [CanBeNull] object baseEntityType) => string.Format( @@ -1128,7 +1128,7 @@ public static string InheritedPropertyCannotBeIgnored([CanBeNull] object propert property, entityType, baseEntityType); /// - /// The property '{entityType}.{navigation}' is of an interface type ('{propertyType}'). If it is a navigation property manually configure the relationship for this property by casting it to a mapped entity type, otherwise ignore the property using the NotMappedAttribute or 'EntityTypeBuilder.Ignore' in 'OnModelCreating'. + /// The property '{entityType}.{navigation}' is of an interface type ('{propertyType}'). If it is a navigation property manually configure the relationship for this property by casting it to a mapped entity type, otherwise ignore the property using the [NotMapped] attribute or 'EntityTypeBuilder.Ignore' in 'OnModelCreating'. /// public static string InterfacePropertyNotAdded([CanBeNull] object entityType, [CanBeNull] object navigation, [CanBeNull] object propertyType) => string.Format( @@ -1212,7 +1212,7 @@ public static string InvalidMembersExpression([CanBeNull] object expression) expression); /// - /// The InversePropertyAttribute on property '{1_entityType}.{0_property}' is not valid. The property '{referencedProperty}' is not a valid navigation property on the related type '{referencedEntityType}'. Ensure that the property exists and is a valid reference or collection navigation property. + /// The [InverseProperty] attribute on property '{1_entityType}.{0_property}' is not valid. The property '{referencedProperty}' is not a valid navigation property on the related type '{referencedEntityType}'. Ensure that the property exists and is a valid reference or collection navigation property. /// public static string InvalidNavigationWithInverseProperty([CanBeNull] object property, [CanBeNull] object entityType, [CanBeNull] object referencedProperty, [CanBeNull] object referencedEntityType) => string.Format( @@ -1244,7 +1244,7 @@ public static string InvalidPropertyExpression([CanBeNull] object expression) expression); /// - /// The property list specified using ForeignKeyAttribute on navigation '{1_entityType}.{0_navigation}' is incorrect. The attribute value should be comma-separated list of property names. + /// The property list specified using [ForeignKey] attribute on navigation '{1_entityType}.{0_navigation}' is incorrect. The attribute value should be comma-separated list of property names. /// public static string InvalidPropertyListOnNavigation([CanBeNull] object navigation, [CanBeNull] object entityType) => string.Format( @@ -1252,7 +1252,7 @@ public static string InvalidPropertyListOnNavigation([CanBeNull] object navigati navigation, entityType); /// - /// Invalid relationship has been specified using InversePropertyAttribute and ForeignKeyAttribute. The navigation '{1_entityType}.{0_navigation}' and the navigation '{3_referencedEntityType}.{2_referencedNavigation}' are related by InversePropertyAttribute but the ForeignKeyAttribute specified for both navigations have different values. + /// Invalid relationship has been specified using [InverseProperty] attribute and [ForeignKey] attribute. The navigation '{1_entityType}.{0_navigation}' and the navigation '{3_referencedEntityType}.{2_referencedNavigation}' are related by [InverseProperty] attribute but the [ForeignKey] attribute specified for both navigations have different values. /// public static string InvalidRelationshipUsingDataAnnotations([CanBeNull] object navigation, [CanBeNull] object entityType, [CanBeNull] object referencedNavigation, [CanBeNull] object referencedEntityType) => string.Format( @@ -1346,7 +1346,7 @@ public static string InvalidValueGeneratorFactoryProperty([CanBeNull] object fac factory, property, entityType); /// - /// InversePropertyAttributes on navigation '{1_entityType}.{0_navigation}' and on navigation '{3_referencedEntityType}.{2_referencedNavigation}' are not pointing to each other. + /// [InverseProperty] attributes on navigation '{1_entityType}.{0_navigation}' and on navigation '{3_referencedEntityType}.{2_referencedNavigation}' are not pointing to each other. /// public static string InversePropertyMismatch([CanBeNull] object navigation, [CanBeNull] object entityType, [CanBeNull] object referencedNavigation, [CanBeNull] object referencedEntityType) => string.Format( @@ -1376,7 +1376,7 @@ public static string IQueryableProviderNotAsync => GetString("IQueryableProviderNotAsync"); /// - /// The derived type '{derivedType}' cannot have KeyAttribute on property '{property}' since primary key can only be declared on the root type. + /// The derived type '{derivedType}' cannot have [Key] attribute on property '{property}' since primary key can only be declared on the root type. /// public static string KeyAttributeOnDerivedEntity([CanBeNull] object derivedType, [CanBeNull] object property) => string.Format( @@ -1512,7 +1512,7 @@ public static string MultipleFilteredIncludesOnSameNavigation([CanBeNull] object filter1, filter2); /// - /// There are multiple navigations in entity type '{entityType}' which are pointing to same set of properties - '{propertyList}' using ForeignKeyAttribute. + /// There are multiple navigations in entity type '{entityType}' which are pointing to same set of properties - '{propertyList}' using [ForeignKey] attribute. /// public static string MultipleNavigationsSameFk([CanBeNull] object entityType, [CanBeNull] object propertyList) => string.Format( @@ -2396,7 +2396,7 @@ public static string SeedDatumSignedNumericValue([CanBeNull] object entityType, entityType, property); /// - /// A relationship cannot be established from property '{1_entityType}.{0_property}' to property '{3_referencedEntityType}.{2_referencedProperty}'. Check the values in the InversePropertyAttribute to ensure relationship definitions are unique and reference from one navigation property to its corresponding inverse navigation property. + /// A relationship cannot be established from property '{1_entityType}.{0_property}' to property '{3_referencedEntityType}.{2_referencedProperty}'. Check the values in the [InverseProperty] attribute to ensure relationship definitions are unique and reference from one navigation property to its corresponding inverse navigation property. /// public static string SelfReferencingNavigationWithInverseProperty([CanBeNull] object property, [CanBeNull] object entityType, [CanBeNull] object referencedProperty, [CanBeNull] object referencedEntityType) => string.Format( @@ -2982,7 +2982,7 @@ public static EventDefinition LogCollectionWithoutComparer([NotN } /// - /// The relationship was separated into two relationships because ForeignKeyAttribute specified on the navigation '{navigationEntityType}.{navigation}' doesn't match the ForeignKeyAttribute specified on the property '{propertyEntityType}.{property}'. + /// The relationship was separated into two relationships because [ForeignKey] attribute specified on the navigation '{navigationEntityType}.{navigation}' doesn't match the [ForeignKey] attribute specified on the property '{propertyEntityType}.{property}'. /// public static EventDefinition LogConflictingForeignKeyAttributesOnNavigationAndProperty([NotNull] IDiagnosticsLogger logger) { @@ -3294,7 +3294,7 @@ public static EventDefinition LogFirstWithoutOrderByAndFilter([NotNull] IDiagnos } /// - /// Navigations '{dependentEntityType}.{dependentNavigation}' and '{principalEntityType}.{principalNavigation}' were separated into two relationships as ForeignKeyAttribute was specified on navigations on both sides. + /// Navigations '{dependentEntityType}.{dependentNavigation}' and '{principalEntityType}.{principalNavigation}' were separated into two relationships as [ForeignKey] attribute was specified on navigations on both sides. /// public static EventDefinition LogForeignKeyAttributesOnBothNavigations([NotNull] IDiagnosticsLogger logger) { @@ -3318,7 +3318,7 @@ public static EventDefinition LogForeignKeyAttri } /// - /// Navigations '{dependentEntityType}.{dependentNavigation}' and '{principalEntityType}.{principalNavigation}' were separated into two relationships as ForeignKeyAttribute was specified on properties '{dependentProperty}' and '{principalProperty}' on both sides. + /// Navigations '{dependentEntityType}.{dependentNavigation}' and '{principalEntityType}.{principalNavigation}' were separated into two relationships as [ForeignKey] attribute was specified on properties '{dependentProperty}' and '{principalProperty}' on both sides. /// public static EventDefinition LogForeignKeyAttributesOnBothProperties([NotNull] IDiagnosticsLogger logger) { @@ -3486,7 +3486,7 @@ public static EventDefinition LogManyServiceProvidersCreated([NotNull] IDiagnost } /// - /// There are multiple navigations ({navigations}) configured with InversePropertyAttribute that point to the same inverse navigation '{inverseNavigation}'. + /// There are multiple navigations ({navigations}) configured with [InverseProperty] attribute that point to the same inverse navigation '{inverseNavigation}'. /// public static EventDefinition LogMultipleInversePropertiesSameTarget([NotNull] IDiagnosticsLogger logger) { @@ -4041,7 +4041,7 @@ public static EventDefinition LogReferenceChangeDetected } /// - /// The navigation property '{navigation}' has a RequiredAttribute causing the entity type '{entityType}' to be configured as the dependent side in the corresponding relationship. + /// The navigation property '{navigation}' has a [Required] attribute causing the entity type '{entityType}' to be configured as the dependent side in the corresponding relationship. /// [Obsolete] public static EventDefinition LogRequiredAttributeInverted([NotNull] IDiagnosticsLogger logger) @@ -4066,7 +4066,7 @@ public static EventDefinition LogRequiredAttributeInverted([NotN } /// - /// The RequiredAttribute on '{principalEntityType}.{principalNavigation}' was ignored because there is also a RequiredAttribute on '{dependentEntityType}.{dependentNavigation}'. RequiredAttribute should only be specified on the dependent side of the relationship. + /// The [Required] attribute on '{principalEntityType}.{principalNavigation}' was ignored because there is also a [Required] attribute on '{dependentEntityType}.{dependentNavigation}'. [Required] attribute should only be specified on the dependent side of the relationship. /// [Obsolete] public static EventDefinition LogRequiredAttributeOnBothNavigations([NotNull] IDiagnosticsLogger logger) @@ -4091,7 +4091,7 @@ public static EventDefinition LogRequiredAttribu } /// - /// The RequiredAttribute on '{principalEntityType}.{principalNavigation}' was ignored because it is a collection. RequiredAttribute should only be specified on reference navigations pointing to the principal side of the relationship. + /// The [Required] attribute on '{principalEntityType}.{principalNavigation}' was ignored because it is a collection. [Required] attribute should only be specified on reference navigations pointing to the principal side of the relationship. /// public static EventDefinition LogRequiredAttributeOnCollection([NotNull] IDiagnosticsLogger logger) { @@ -4115,7 +4115,7 @@ public static EventDefinition LogRequiredAttributeOnCollection([ } /// - /// The RequiredAttribute on '{principalEntityType}.{principalNavigation}' is invalid. RequiredAttribute should only be specified on the navigation pointing to the principal side of the relationship. To change the dependent side configure the foreign key properties. + /// The [Required] attribute on '{principalEntityType}.{principalNavigation}' is invalid. [Required] attribute should only be specified on the navigation pointing to the principal side of the relationship. To change the dependent side configure the foreign key properties. /// [Obsolete] public static EventDefinition LogRequiredAttributeOnDependent([NotNull] IDiagnosticsLogger logger) @@ -4140,7 +4140,7 @@ public static EventDefinition LogRequiredAttributeOnDependent([N } /// - /// The RequiredAttribute on '{principalEntityType}.{principalNavigation}' was ignored because it is a skip navigation. Instead configure the underlying foreign keys. + /// The [Required] attribute on '{principalEntityType}.{principalNavigation}' was ignored because it is a skip navigation. Instead configure the underlying foreign keys. /// public static EventDefinition LogRequiredAttributeOnSkipNavigation([NotNull] IDiagnosticsLogger logger) { diff --git a/src/EFCore/Properties/CoreStrings.resx b/src/EFCore/Properties/CoreStrings.resx index 6b8f09f5752..576f6b0b83b 100644 --- a/src/EFCore/Properties/CoreStrings.resx +++ b/src/EFCore/Properties/CoreStrings.resx @@ -120,6 +120,9 @@ The corresponding CLR type for entity type '{entityType}' is not instantiable and there is no derived entity type in the model that corresponds to a concrete CLR type. + + Cannot add an entity type with type '{typeName}' to the model as it is a dynamically-generated proxy type. + The entity type '{entityType}' has a defining navigation and the supplied entity is currently referenced from several owner entities. To access the entry for a particular reference call '{targetEntryCall}' on the owner entry. @@ -142,7 +145,7 @@ Unable to determine the owner for the relationship between '{entityTypeNavigationSpecification}' and '{otherEntityType}' as both types have been marked as owned. Either manually configure the ownership, or ignore the corresponding navigations using the '[NotMapped]' attribute or by using 'EntityTypeBuilder.Ignore' in 'OnModelCreating'. - The service property '{property}' of type '{serviceType}' cannot be added to the entity type '{entityType}' because there is another property of the same type. Ignore one of the properties using the NotMappedAttribute or 'EntityTypeBuilder.Ignore' in 'OnModelCreating'. + The service property '{property}' of type '{serviceType}' cannot be added to the entity type '{entityType}' because there is another property of the same type. Ignore one of the properties using the [NotMapped] attribute or 'EntityTypeBuilder.Ignore' in 'OnModelCreating'. The annotation '{annotation}' was not found. Ensure that the annotation has been added. @@ -150,9 +153,6 @@ The property '{property}' of the argument '{argument}' cannot be null. - - Cannot add an entity type with type '{typeName}'. That type is a dynamically-generated proxy type. - Cannot set backing field '{field}' for the indexer property '{entityType}.{property}'. Ensure no backing fields are specified for indexer properties. @@ -184,7 +184,7 @@ The property '{1_entityType}.{0_property}' cannot be marked as nullable/optional because the property is a part of a key. Any property can be marked as non-nullable/required, but only properties of nullable types and which are not part of a key can be marked as nullable/optional. - Unable to convert queryable method to enumerable method. + Unable to convert queryable method to enumerable method. This is likely an issue in EF Core, please report it. Cannot create instance of value generator type '{generatorType}'. Ensure that the type is instantiable and has a parameterless constructor, or use the overload of HasValueGenerator that accepts a delegate. @@ -256,7 +256,7 @@ Comparer for type '{type}' cannot be used for '{entityType}.{propertyName}' because its type is '{propertyType}'. - There are multiple properties pointing to navigation '{1_entityType}.{0_navigation}'. To define composite foreign key using data annotations, use ForeignKeyAttribute on navigation. + There are multiple properties pointing to navigation '{1_entityType}.{0_navigation}'. To define composite foreign key using data annotations, use [ForeignKey] attribute on navigation. Entity type '{entityType}' has composite primary key defined with data annotations. To set composite primary key, use fluent API. @@ -268,7 +268,7 @@ Property '{1_entityType}.{0_property}' matches both '{field1}' and '{field2}' by convention. Explicitly specify the backing field to use with '.HasField()' in 'OnModelCreating()'. - There are multiple ForeignKeyAttributes which are pointing to same set of properties - '{propertyList}' on entity type '{entityType}'. + There are multiple [ForeignKey] attributes which are pointing to same set of properties - '{propertyList}' on entity type '{entityType}'. The property or navigation '{member}' cannot be added to the entity type '{entityType}' because a property or navigation with the same name already exists on entity type '{conflictingEntityType}'. @@ -331,7 +331,7 @@ A key cannot be configured on '{derivedType}' because it is a derived type. The key must be configured on the root type '{rootType}'. If you did not intend for '{rootType}' to be included in the model, ensure that it is not included in a DbSet property on your context, referenced in a configuration call to ModelBuilder, or referenced from a navigation property on a type that is included in the model. - The entity type '{entityType}' cannot have a defining query because it is derived from '{baseType}'. Only base keyless entity types can have a defining query. + The entity type '{entityType}' cannot have a defining query because it is derived from '{baseType}'. Only base entity types can have a defining query. Cannot configure the discriminator value for entity type '{entityType}' because it doesn't derive from '{rootEntityType}'. @@ -454,10 +454,10 @@ The key value at position {index} of the call to 'DbSet<{entityType}>.Find' was of type '{valueType}', which does not match the property type of '{propertyType}'. - The ForeignKeyAttribute for the navigation '{navigation}' cannot be specified on the entity type '{principalType}' since it represents a one-to-many relationship. Move the ForeignKeyAttribute to a property on '{dependentType}'. + The [ForeignKey] attribute for the navigation '{navigation}' cannot be specified on the entity type '{principalType}' since it represents a one-to-many relationship. Move the [ForeignKey] attribute to a property on '{dependentType}'. - The ForeignKeyAttributes on property '{property}' and navigation '{navigation}' in entity type '{entityType}' do not point at each other. The value of ForeignKeyAttribute on property should be navigation name and the value of ForeignKeyAttribute on navigation should be the foreign key property name. + The [ForeignKey] attributes on property '{property}' and navigation '{navigation}' in entity type '{entityType}' do not point at each other. The value of [ForeignKey] attribute on property should be navigation name and the value of [ForeignKey] attribute on navigation should be the foreign key property name. The number of properties specified for the foreign key {foreignKey} on entity type '{dependentType}' does not match the number of properties in the principal key {principalKey} on entity type '{principalType}'. @@ -539,10 +539,10 @@ The index {indexProperties} cannot be removed from the entity type '{entityType}' because it is defined on the entity type '{otherEntityType}'. - The property '{property}' cannot be ignored on entity type '{entityType}', because it's declared on the base entity type '{baseEntityType}'. To exclude this property from your model, use NotMappedAttribute or Ignore method on the base type. + The property '{property}' cannot be ignored on entity type '{entityType}', because it's declared on the base entity type '{baseEntityType}'. To exclude this property from your model, use [NotMapped] attribute or Ignore method on the base type. - The property '{entityType}.{navigation}' is of an interface type ('{propertyType}'). If it is a navigation property manually configure the relationship for this property by casting it to a mapped entity type, otherwise ignore the property using the NotMappedAttribute or 'EntityTypeBuilder.Ignore' in 'OnModelCreating'. + The property '{entityType}.{navigation}' is of an interface type ('{propertyType}'). If it is a navigation property manually configure the relationship for this property by casting it to a mapped entity type, otherwise ignore the property using the [NotMapped] attribute or 'EntityTypeBuilder.Ignore' in 'OnModelCreating'. The entity type related to '{entityType}' cannot be determined because the specified foreign key {foreignKey} references entity type '{principalEntityType}' that it is in the same hierarchy as the entity type that it is declared on '{dependentEntityType}'. @@ -575,7 +575,7 @@ The expression '{expression}' is not a valid members access expression. The expression should represent a simple property or field access: 't => t.MyProperty'. When specifying multiple properties or fields use an anonymous type: 't => new {{ t.MyProperty, t.MyField }}'. - The InversePropertyAttribute on property '{1_entityType}.{0_property}' is not valid. The property '{referencedProperty}' is not a valid navigation property on the related type '{referencedEntityType}'. Ensure that the property exists and is a valid reference or collection navigation property. + The [InverseProperty] attribute on property '{1_entityType}.{0_property}' is not valid. The property '{referencedProperty}' is not a valid navigation property on the related type '{referencedEntityType}'. Ensure that the property exists and is a valid reference or collection navigation property. The specified poolSize must be greater than 0. @@ -589,10 +589,10 @@ Obsolete - The property list specified using ForeignKeyAttribute on navigation '{1_entityType}.{0_navigation}' is incorrect. The attribute value should be comma-separated list of property names. + The property list specified using [ForeignKey] attribute on navigation '{1_entityType}.{0_navigation}' is incorrect. The attribute value should be comma-separated list of property names. - Invalid relationship has been specified using InversePropertyAttribute and ForeignKeyAttribute. The navigation '{1_entityType}.{0_navigation}' and the navigation '{3_referencedEntityType}.{2_referencedNavigation}' are related by InversePropertyAttribute but the ForeignKeyAttribute specified for both navigations have different values. + Invalid relationship has been specified using [InverseProperty] attribute and [ForeignKey] attribute. The navigation '{1_entityType}.{0_navigation}' and the navigation '{3_referencedEntityType}.{2_referencedNavigation}' are related by [InverseProperty] attribute but the [ForeignKey] attribute specified for both navigations have different values. A call was made to '{replaceService}', but Entity Framework is not building its own internal service provider. Either allow EF to build the service provider by removing the call to '{useInternalServiceProvider}', or build replacement services into the service provider before passing it to '{useInternalServiceProvider}'. @@ -628,7 +628,7 @@ The '{factory}' cannot create a value generator for property '{2_entityType}.{1_property}'. Only integer properties are supported. - InversePropertyAttributes on navigation '{1_entityType}.{0_navigation}' and on navigation '{3_referencedEntityType}.{2_referencedNavigation}' are not pointing to each other. + [InverseProperty] attributes on navigation '{1_entityType}.{0_navigation}' and on navigation '{3_referencedEntityType}.{2_referencedNavigation}' are not pointing to each other. The navigation '{principalEntityType}.{navigation}' is not supported because it is pointing to an owned entity type '{ownedType}'. Only the ownership navigation from the entity type '{ownerType}' can point to the owned entity type. @@ -640,7 +640,7 @@ The provider for the source IQueryable doesn't implement IAsyncQueryProvider. Only providers that implement IAsyncQueryProvider can be used for Entity Framework asynchronous operations. - The derived type '{derivedType}' cannot have KeyAttribute on property '{property}' since primary key can only be declared on the root type. + The derived type '{derivedType}' cannot have [Key] attribute on property '{property}' since primary key can only be declared on the root type. Cannot remove key {key} from entity type '{entityType}' because it is referenced by a foreign key {foreignKey} in entity type '{dependentType}'. All foreign keys must be removed or redefined before the referenced key can be removed. @@ -708,7 +708,7 @@ Warning CoreEventId.CollectionWithoutComparer string string - The relationship was separated into two relationships because ForeignKeyAttribute specified on the navigation '{navigationEntityType}.{navigation}' doesn't match the ForeignKeyAttribute specified on the property '{propertyEntityType}.{property}'. + The relationship was separated into two relationships because [ForeignKey] attribute specified on the navigation '{navigationEntityType}.{navigation}' doesn't match the [ForeignKey] attribute specified on the property '{propertyEntityType}.{property}'. Warning CoreEventId.ConflictingForeignKeyAttributesOnNavigationAndPropertyWarning string string string string @@ -760,11 +760,11 @@ Warning CoreEventId.FirstWithoutOrderByAndFilterWarning - Navigations '{dependentEntityType}.{dependentNavigation}' and '{principalEntityType}.{principalNavigation}' were separated into two relationships as ForeignKeyAttribute was specified on navigations on both sides. + Navigations '{dependentEntityType}.{dependentNavigation}' and '{principalEntityType}.{principalNavigation}' were separated into two relationships as [ForeignKey] attribute was specified on navigations on both sides. Warning CoreEventId.ForeignKeyAttributesOnBothNavigationsWarning string string string string - Navigations '{dependentEntityType}.{dependentNavigation}' and '{principalEntityType}.{principalNavigation}' were separated into two relationships as ForeignKeyAttribute was specified on properties '{dependentProperty}' and '{principalProperty}' on both sides. + Navigations '{dependentEntityType}.{dependentNavigation}' and '{principalEntityType}.{principalNavigation}' were separated into two relationships as [ForeignKey] attribute was specified on properties '{dependentProperty}' and '{principalProperty}' on both sides. Warning CoreEventId.ForeignKeyAttributesOnBothPropertiesWarning string string string string string string @@ -792,7 +792,7 @@ Warning CoreEventId.ManyServiceProvidersCreatedWarning - There are multiple navigations ({navigations}) configured with InversePropertyAttribute that point to the same inverse navigation '{inverseNavigation}'. + There are multiple navigations ({navigations}) configured with [InverseProperty] attribute that point to the same inverse navigation '{inverseNavigation}'. Warning CoreEventId.MultipleInversePropertiesSameTargetWarning string string @@ -884,23 +884,23 @@ Debug CoreEventId.ReferenceChangeDetected string string string - The navigation property '{navigation}' has a RequiredAttribute causing the entity type '{entityType}' to be configured as the dependent side in the corresponding relationship. + The navigation property '{navigation}' has a [Required] attribute causing the entity type '{entityType}' to be configured as the dependent side in the corresponding relationship. Obsolete Debug CoreEventId.RequiredAttributeInverted string string - The RequiredAttribute on '{principalEntityType}.{principalNavigation}' was ignored because there is also a RequiredAttribute on '{dependentEntityType}.{dependentNavigation}'. RequiredAttribute should only be specified on the dependent side of the relationship. + The [Required] attribute on '{principalEntityType}.{principalNavigation}' was ignored because there is also a [Required] attribute on '{dependentEntityType}.{dependentNavigation}'. [Required] attribute should only be specified on the dependent side of the relationship. Obsolete Debug CoreEventId.RequiredAttributeOnBothNavigations string string string string - The RequiredAttribute on '{principalEntityType}.{principalNavigation}' was ignored because it is a collection. RequiredAttribute should only be specified on reference navigations pointing to the principal side of the relationship. + The [Required] attribute on '{principalEntityType}.{principalNavigation}' was ignored because it is a collection. [Required] attribute should only be specified on reference navigations pointing to the principal side of the relationship. Debug CoreEventId.RequiredAttributeOnCollection string string - The RequiredAttribute on '{principalEntityType}.{principalNavigation}' is invalid. RequiredAttribute should only be specified on the navigation pointing to the principal side of the relationship. To change the dependent side configure the foreign key properties. + The [Required] attribute on '{principalEntityType}.{principalNavigation}' is invalid. [Required] attribute should only be specified on the navigation pointing to the principal side of the relationship. To change the dependent side configure the foreign key properties. Obsolete Error CoreEventId.RequiredAttributeOnDependent string string - The RequiredAttribute on '{principalEntityType}.{principalNavigation}' was ignored because it is a skip navigation. Instead configure the underlying foreign keys. + The [Required] attribute on '{principalEntityType}.{principalNavigation}' was ignored because it is a skip navigation. Instead configure the underlying foreign keys. Debug CoreEventId.RequiredAttributeOnSkipNavigation string string @@ -987,7 +987,7 @@ Different filters: '{filter1}' and '{filter2}' have been applied on the same included navigation. Only one unique filter per navigation is allowed. For more information on including related data, see http://go.microsoft.com/fwlink/?LinkID=746393. - There are multiple navigations in entity type '{entityType}' which are pointing to same set of properties - '{propertyList}' using ForeignKeyAttribute. + There are multiple navigations in entity type '{entityType}' which are pointing to same set of properties - '{propertyList}' using [ForeignKey] attribute. The entity type '{entityType}' is the target of multiple ownership relationships. @@ -1329,7 +1329,7 @@ The seed entity for entity type '{entityType}' cannot be added because a non-zero value is required for property '{property}'. Consider providing a negative value to avoid collisions with non-seed data. - A relationship cannot be established from property '{1_entityType}.{0_property}' to property '{3_referencedEntityType}.{2_referencedProperty}'. Check the values in the InversePropertyAttribute to ensure relationship definitions are unique and reference from one navigation property to its corresponding inverse navigation property. + A relationship cannot be established from property '{1_entityType}.{0_property}' to property '{3_referencedEntityType}.{2_referencedProperty}'. Check the values in the [InverseProperty] attribute to ensure relationship definitions are unique and reference from one navigation property to its corresponding inverse navigation property. Sequence contains more than one element.