共用方式為


CoreStrings.InvalidRelationshipUsingDataAnnotations 方法

定義

使用 [InverseProperty] 和 [ForeignKey] 屬性指定了不正確關聯性。 流覽 '{1_entityType}。{0_navigation}' 和 '{3_referencedEntityType}。{2_referencedNavigation}' 與 [InverseProperty] 屬性相關,但兩個導覽所指定的 [ForeignKey] 屬性有不同的值。 請指定相同的屬性,或移除其中一個屬性。

public static string InvalidRelationshipUsingDataAnnotations (object navigation, object entityType, object referencedNavigation, object referencedEntityType);
public static string InvalidRelationshipUsingDataAnnotations (object? navigation, object? entityType, object? referencedNavigation, object? referencedEntityType);
static member InvalidRelationshipUsingDataAnnotations : obj * obj * obj * obj -> string
Public Shared Function InvalidRelationshipUsingDataAnnotations (navigation As Object, entityType As Object, referencedNavigation As Object, referencedEntityType As Object) As String

參數

navigation
Object
entityType
Object
referencedNavigation
Object
referencedEntityType
Object

傳回

適用於