語言

IConventionServicePropertyBuilder.HasField 方法

定義

多載

名稱 Description
HasField(FieldInfo, Boolean)

設定用於此屬性的背景欄位。

HasField(String, Boolean)

設定用於此屬性的背景欄位。

HasField(FieldInfo, Boolean)

來源:
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)

來源:
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 否則。

適用於