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 否则为 。

适用于