語言

IConventionForeignKeyBuilder.CanInvert 方法

定義

回傳一個值,指示主實體與依賴實體類型是否能從當前配置來源切換

public bool CanInvert(System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IConventionProperty>? newForeignKeyProperties, bool fromDataAnnotation = false);
public bool CanInvert(System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IConventionProperty> newForeignKeyProperties, bool fromDataAnnotation = false);
abstract member CanInvert : System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IConventionProperty> * bool -> bool
Public Function CanInvert (newForeignKeyProperties As IReadOnlyList(Of IConventionProperty), Optional fromDataAnnotation As Boolean = false) As Boolean

參數

newForeignKeyProperties
IReadOnlyList<IConventionProperty>

這些屬性將被用作新的外鍵,或 null 使用任何相容的屬性。

fromDataAnnotation
Boolean

表示配置是否以資料註解方式指定。

傳回

true 如果主實體和受依賴實體類型可以互換。

適用於