次の方法で共有


IConventionForeignKeyBuilder.CanSetEntityTypes メソッド

定義

プリンシパル型と依存型を切り替えることができるか、関係を参加しているエンティティ型のいずれかの基本型に移動できるかどうかを示す値を返します。

public bool CanSetEntityTypes (Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType principalEntityType, Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType dependentEntityType, bool fromDataAnnotation = false);
abstract member CanSetEntityTypes : Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType * Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType * bool -> bool
Public Function CanSetEntityTypes (principalEntityType As IConventionEntityType, dependentEntityType As IConventionEntityType, Optional fromDataAnnotation As Boolean = false) As Boolean

パラメーター

principalEntityType
IConventionEntityType

設定するプリンシパル エンティティの種類。

dependentEntityType
IConventionEntityType

設定する依存エンティティの種類。

fromDataAnnotation
Boolean

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

戻り値

true プリンシパルと依存エンティティの種類を切り替えることができる場合、または関係を参加しているエンティティ型の 1 つの基本型に移動できる場合。

適用対象