ConventionTypeBaseExtensions.SetNavigationAccessMode Methode

Definition

Legt fest, dass für PropertyAccessMode Navigationen dieses Entitätstyps verwendet werden soll.

Beachten Sie, dass einzelne Navigationen diesen Zugriffsmodus überschreiben können. Der hier festgelegte Wert wird für jede Navigation verwendet, für die keine Überschreibung angegeben wurde.

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)

Parameter

entityType
IConventionTypeBase

Der Typ, für den der Zugriffsmodus festgelegt werden soll.

propertyAccessMode
Nullable<PropertyAccessMode>

Oder PropertyAccessMode, null um den Modus zu löschen.

fromDataAnnotation
Boolean

Gibt an, ob die Konfiguration mithilfe einer Datenanmerkung angegeben wurde.

Gibt zurück

Der konfigurierte Wert.

Gilt für: