共用方式為


IConventionServicePropertyBuilder.UsePropertyAccessMode 方法

定義

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

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

參數

propertyAccessMode
Nullable<PropertyAccessMode>

PropertyAccessMode要用於這個屬性的 。

fromDataAnnotation
Boolean

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

傳回

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

適用於