語言

ConventionPropertyBaseExtensions.SetPropertyAccessMode 方法

定義

設定 使用 這個 PropertyAccessMode 屬性。

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

參數

property
IConventionPropertyBase

設定存取模式的屬性。

propertyAccessMode
Nullable<PropertyAccessMode>

該 PropertyAccessMode,或空值以清除模式集合。

fromDataAnnotation
Boolean

表示配置是否以資料註解方式指定。

傳回

設定值。

適用於