語言

IConventionForeignKeyBuilder.CanSetForeignKey 方法

定義

多載

名稱 Description
CanSetForeignKey(IReadOnlyList<IConventionProperty>, Boolean)

回傳一個值,表示是否能將給定屬性設為目前組態來源的外鍵。

CanSetForeignKey(IReadOnlyList<String>, Boolean)

回傳一個值,表示是否能將給定屬性設為目前組態來源的外鍵。

CanSetForeignKey(IReadOnlyList<IConventionProperty>, Boolean)

來源:
IConventionForeignKeyBuilder.cs
來源:
IConventionForeignKeyBuilder.cs
來源:
IConventionForeignKeyBuilder.cs
來源:
IConventionForeignKeyBuilder.cs
來源:
IConventionForeignKeyBuilder.cs

回傳一個值,表示是否能將給定屬性設為目前組態來源的外鍵。

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

參數

properties
IReadOnlyList<IConventionProperty>

作為此關係外鍵的屬性。

fromDataAnnotation
Boolean

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

傳回

true 若給定屬性可設定為外鍵。

適用於

CanSetForeignKey(IReadOnlyList<String>, Boolean)

來源:
IConventionForeignKeyBuilder.cs
來源:
IConventionForeignKeyBuilder.cs
來源:
IConventionForeignKeyBuilder.cs
來源:
IConventionForeignKeyBuilder.cs
來源:
IConventionForeignKeyBuilder.cs

回傳一個值,表示是否能將給定屬性設為目前組態來源的外鍵。

public bool CanSetForeignKey(System.Collections.Generic.IReadOnlyList<string>? propertyNames, bool fromDataAnnotation = false);
public bool CanSetForeignKey(System.Collections.Generic.IReadOnlyList<string> propertyNames, bool fromDataAnnotation = false);
abstract member CanSetForeignKey : System.Collections.Generic.IReadOnlyList<string> * bool -> bool
Public Function CanSetForeignKey (propertyNames As IReadOnlyList(Of String), Optional fromDataAnnotation As Boolean = false) As Boolean

參數

propertyNames
IReadOnlyList<String>

作為此關係外鍵的屬性。

fromDataAnnotation
Boolean

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

傳回

true 若給定屬性可設定為外鍵。

適用於