語言

IConventionForeignKeyBuilder.CanSetPrincipalKey 方法

定義

多載

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

回傳一個值,指示是否能將該屬性設為目前配置來源的目標關係

CanSetPrincipalKey(IReadOnlyList<String>, Boolean)

回傳一個值,指示是否能將該屬性設為目前配置來源的目標關係

CanSetPrincipalKey(IReadOnlyList<IConventionProperty>, Boolean)

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

回傳一個值,指示是否能將該屬性設為目前配置來源的目標關係

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

參數

properties
IReadOnlyList<IConventionProperty>

這段關係的屬性是要瞄準的。

fromDataAnnotation
Boolean

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

傳回

true 若能將給定屬性設為目標。

適用於

CanSetPrincipalKey(IReadOnlyList<String>, Boolean)

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

回傳一個值,指示是否能將該屬性設為目前配置來源的目標關係

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

參數

propertyNames
IReadOnlyList<String>

這段關係的屬性是要瞄準的。

fromDataAnnotation
Boolean

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

傳回

true 若能將給定屬性設為目標。

適用於