RelationalElementTypeBuilderExtensions.IsFixedLength 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
IsFixedLength(ElementTypeBuilder, Boolean) |
將元素設定為只儲存固定長度的資料,例如字串。 |
IsFixedLength(IConventionElementTypeBuilder, Nullable<Boolean>, Boolean) |
將元素設定為只儲存固定長度的資料,例如字串。 |
IsFixedLength(ElementTypeBuilder, Boolean)
將元素設定為只儲存固定長度的資料,例如字串。
public static Microsoft.EntityFrameworkCore.Metadata.Builders.ElementTypeBuilder IsFixedLength (this Microsoft.EntityFrameworkCore.Metadata.Builders.ElementTypeBuilder elementTypeBuilder, bool fixedLength = true);
static member IsFixedLength : Microsoft.EntityFrameworkCore.Metadata.Builders.ElementTypeBuilder * bool -> Microsoft.EntityFrameworkCore.Metadata.Builders.ElementTypeBuilder
<Extension()>
Public Function IsFixedLength (elementTypeBuilder As ElementTypeBuilder, Optional fixedLength As Boolean = true) As ElementTypeBuilder
參數
- elementTypeBuilder
- ElementTypeBuilder
所設定專案的產生器。
- fixedLength
- Boolean
值,指出專案是否受限於固定長度值。
傳回
相同的產生器實例,以便鏈結多個組態呼叫。
備註
如需詳細資訊和範例,請參閱 模型化實體類型和關聯 性。
適用於
IsFixedLength(IConventionElementTypeBuilder, Nullable<Boolean>, Boolean)
將元素設定為只儲存固定長度的資料,例如字串。
public static Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionElementTypeBuilder? IsFixedLength (this Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionElementTypeBuilder elementTypeBuilder, bool? fixedLength, bool fromDataAnnotation = false);
static member IsFixedLength : Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionElementTypeBuilder * Nullable<bool> * bool -> Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionElementTypeBuilder
<Extension()>
Public Function IsFixedLength (elementTypeBuilder As IConventionElementTypeBuilder, fixedLength As Nullable(Of Boolean), Optional fromDataAnnotation As Boolean = false) As IConventionElementTypeBuilder
參數
- elementTypeBuilder
- IConventionElementTypeBuilder
正在設定之專案的建立器。
- fromDataAnnotation
- Boolean
指出是否使用資料批註來指定組態。
傳回
如果套用組態,則為相同的產生器實例, null
否則為 。
備註
如需詳細資訊和範例,請參閱 模型化實體類型和關聯 性。
適用於
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應