次の方法で共有


ConventionTypeBaseExtensions.SetNavigationAccessMode メソッド

定義

PropertyAccessModeこのエンティティ型のナビゲーションに使用する を設定します。

個々のナビゲーションがこのアクセス モードをオーバーライドできることに注意してください。 ここで設定した値は、オーバーライドが指定されていないナビゲーションに使用されます。

public static void SetNavigationAccessMode (this Microsoft.EntityFrameworkCore.Metadata.IConventionTypeBase entityType, Microsoft.EntityFrameworkCore.PropertyAccessMode? propertyAccessMode, bool fromDataAnnotation = false);
public static Microsoft.EntityFrameworkCore.PropertyAccessMode? SetNavigationAccessMode (this Microsoft.EntityFrameworkCore.Metadata.IConventionTypeBase entityType, Microsoft.EntityFrameworkCore.PropertyAccessMode? propertyAccessMode, bool fromDataAnnotation = false);
static member SetNavigationAccessMode : Microsoft.EntityFrameworkCore.Metadata.IConventionTypeBase * Nullable<Microsoft.EntityFrameworkCore.PropertyAccessMode> * bool -> unit
static member SetNavigationAccessMode : Microsoft.EntityFrameworkCore.Metadata.IConventionTypeBase * Nullable<Microsoft.EntityFrameworkCore.PropertyAccessMode> * bool -> Nullable<Microsoft.EntityFrameworkCore.PropertyAccessMode>
<Extension()>
Public Sub SetNavigationAccessMode (entityType As IConventionTypeBase, propertyAccessMode As Nullable(Of PropertyAccessMode), Optional fromDataAnnotation As Boolean = false)
<Extension()>
Public Function SetNavigationAccessMode (entityType As IConventionTypeBase, propertyAccessMode As Nullable(Of PropertyAccessMode), Optional fromDataAnnotation As Boolean = false) As Nullable(Of PropertyAccessMode)

パラメーター

entityType
IConventionTypeBase

アクセス モードを設定する型。

propertyAccessMode
Nullable<PropertyAccessMode>

モード PropertyAccessModeセットをクリアする 。または null

fromDataAnnotation
Boolean

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

戻り値

構成された値です。

適用対象