IConventionServicePropertyBuilder.HasField 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
| 名稱 | Description |
|---|---|
| HasField(FieldInfo, Boolean) |
設定用於此屬性的背景欄位。 |
| HasField(String, Boolean) |
設定用於此屬性的背景欄位。 |
HasField(FieldInfo, Boolean)
設定用於此屬性的背景欄位。
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)
設定用於此屬性的背景欄位。
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 否則。