Share via


IConventionPropertyBuilder.HasField 方法

定義

多載

HasField(FieldInfo, Boolean)

設定要用於此屬性的備份欄位。

HasField(String, Boolean)

設定要用於此屬性的備份欄位。

HasField(FieldInfo, Boolean)

設定要用於此屬性的備份欄位。

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

參數

fieldInfo
FieldInfo

欄位。

fromDataAnnotation
Boolean

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

傳回

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

適用於

HasField(String, Boolean)

設定要用於此屬性的備份欄位。

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

參數

fieldName
String

欄位名稱。

fromDataAnnotation
Boolean

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

傳回

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

適用於