IConventionForeignKeyBuilder.CanSetPrincipalKey 方法

定义

重载

CanSetPrincipalKey(IReadOnlyList<IConventionProperty>, Boolean)

返回一个值,该值指示是否可以将给定属性设置为当前配置源中此关系的目标

CanSetPrincipalKey(IReadOnlyList<String>, Boolean)

返回一个值,该值指示是否可以将给定属性设置为当前配置源中此关系的目标

CanSetPrincipalKey(IReadOnlyList<IConventionProperty>, Boolean)

Source:
IConventionForeignKeyBuilder.cs
Source:
IConventionForeignKeyBuilder.cs
Source:
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)

Source:
IConventionForeignKeyBuilder.cs
Source:
IConventionForeignKeyBuilder.cs
Source:
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 如果给定属性可以设置为目标,则为 。

适用于