IConventionServicePropertyBuilder.HasField 方法

定义

重载

HasField(FieldInfo, Boolean)

设置要用于此属性的后备字段。

HasField(String, Boolean)

设置要用于此属性的后备字段。

HasField(FieldInfo, Boolean)

Source:
IConventionServicePropertyBuilder.cs

设置要用于此属性的后备字段。

public Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionServicePropertyBuilder HasField (System.Reflection.FieldInfo fieldInfo, bool fromDataAnnotation = false);
public Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionServicePropertyBuilder? HasField (System.Reflection.FieldInfo? fieldInfo, bool fromDataAnnotation = false);
abstract member HasField : System.Reflection.FieldInfo * bool -> Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionServicePropertyBuilder
Public Function HasField (fieldInfo As FieldInfo, Optional fromDataAnnotation As Boolean = false) As IConventionServicePropertyBuilder

参数

fieldInfo
FieldInfo

字段。

fromDataAnnotation
Boolean

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

返回

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

适用于

HasField(String, Boolean)

Source:
IConventionServicePropertyBuilder.cs

设置要用于此属性的后备字段。

public Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionServicePropertyBuilder HasField (string fieldName, bool fromDataAnnotation = false);
public Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionServicePropertyBuilder? HasField (string? fieldName, bool fromDataAnnotation = false);
abstract member HasField : string * bool -> Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionServicePropertyBuilder
Public Function HasField (fieldName As String, Optional fromDataAnnotation As Boolean = false) As IConventionServicePropertyBuilder

参数

fieldName
String

字段名。

fromDataAnnotation
Boolean

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

返回

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

适用于