IConventionPropertyBaseBuilder.UsePropertyAccessMode 方法

定义

PropertyAccessMode设置要用于此属性类似对象的 。

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

参数

propertyAccessMode
Nullable<PropertyAccessMode>

PropertyAccessMode 用于此属性类似对象的 。

fromDataAnnotation
Boolean

指示配置是否是使用数据注释指定的。

返回

如果应用了配置,则为同一生成器实例, null 否则为 。

适用于