Share via


ConventionTypeBaseExtensions.SetPropertyAccessMode Metodo

Definizione

Imposta l'oggetto PropertyAccessMode da usare per le proprietà di questo tipo.

Si noti che le singole proprietà e gli spostamenti possono eseguire l'override di questa modalità di accesso. Il valore impostato qui verrà usato per qualsiasi proprietà o spostamento per cui non è stato specificato alcun override.

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

Parametri

entityType
IConventionTypeBase

Tipo per impostare la modalità di accesso.

propertyAccessMode
Nullable<PropertyAccessMode>

Oggetto PropertyAccessModeo null per cancellare il set di modalità.

fromDataAnnotation
Boolean

Indica se la configurazione è stata specificata usando un'annotazione dati.

Restituisce

Il valore configurato.

Si applica a