次の方法で共有


IConventionEntityTypeBuilder.CanSetPrimaryKey メソッド

定義

オーバーロード

CanSetPrimaryKey(IReadOnlyList<IConventionProperty>, Boolean)

指定したプロパティをこのエンティティ型の主キーとして設定できるかどうかを示す値を返します。

CanSetPrimaryKey(IReadOnlyList<String>, Boolean)

指定したプロパティをこのエンティティ型の主キーとして設定できるかどうかを示す値を返します。

CanSetPrimaryKey(IReadOnlyList<IConventionProperty>, Boolean)

指定したプロパティをこのエンティティ型の主キーとして設定できるかどうかを示す値を返します。

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

パラメーター

properties
IReadOnlyList<IConventionProperty>

主キーを構成するプロパティ。

fromDataAnnotation
Boolean

構成がデータ注釈を使用して指定されたかどうかを示します。

戻り値

true 指定されたプロパティを主キーとして設定できる場合は 。

適用対象

CanSetPrimaryKey(IReadOnlyList<String>, Boolean)

指定したプロパティをこのエンティティ型の主キーとして設定できるかどうかを示す値を返します。

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

パラメーター

propertyNames
IReadOnlyList<String>

インデックスを構成するプロパティの名前。

fromDataAnnotation
Boolean

構成がデータ注釈を使用して指定されたかどうかを示します。

戻り値

true 指定されたプロパティを主キーとして設定できる場合は 。

適用対象