ConventionTypeBaseExtensions.SetNavigationAccessMode Method

Definition

Sets the PropertyAccessMode to use for navigations of this entity type.

Note that individual navigations can override this access mode. The value set here will be used for any navigation for which no override has been specified.

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)

Parameters

entityType
IConventionTypeBase

The type for which to set the access mode.

propertyAccessMode
Nullable<PropertyAccessMode>

The PropertyAccessMode, or null to clear the mode set.

fromDataAnnotation
Boolean

Indicates whether the configuration was specified using a data annotation.

Returns

The configured value.

Applies to