共用方式為


IConventionPropertyBuilder.UsePropertyAccessMode 方法

定義

PropertyAccessMode設定要用於這個屬性的 。

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

參數

propertyAccessMode
Nullable<PropertyAccessMode>

PropertyAccessMode要用於這個屬性的 。

fromDataAnnotation
Boolean

指出是否使用資料批註來指定組態。

傳回

如果套用組態,則為相同的產生器實例, null 否則為 。

適用於