RelationalElementTypeBuilderExtensions.IsFixedLength 方法

定義

多載

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

正在設定之專案的建立器。

fixedLength
Nullable<Boolean>

值,指出專案是否受限於固定長度值。

fromDataAnnotation
Boolean

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

傳回

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

備註

如需詳細資訊和範例,請參閱 模型化實體類型和關聯 性。

適用於