Dela via


IConventionPropertyBase.SetPropertyAccessMode Method

Definition

Sets the PropertyAccessMode to use for this property.

public Microsoft.EntityFrameworkCore.PropertyAccessMode? SetPropertyAccessMode (Microsoft.EntityFrameworkCore.PropertyAccessMode? propertyAccessMode, bool fromDataAnnotation = false);
abstract member SetPropertyAccessMode : Nullable<Microsoft.EntityFrameworkCore.PropertyAccessMode> * bool -> Nullable<Microsoft.EntityFrameworkCore.PropertyAccessMode>
Public Function SetPropertyAccessMode (propertyAccessMode As Nullable(Of PropertyAccessMode), Optional fromDataAnnotation As Boolean = false) As Nullable(Of PropertyAccessMode)

Parameters

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