RelationalElementTypeBuilderExtensions.CanSetFixedLength 方法

定義

傳回值,指出是否可以將專案設定為固定長度。

public static bool CanSetFixedLength (this Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionElementTypeBuilder elementTypeBuilder, bool? fixedLength, bool fromDataAnnotation = false);
static member CanSetFixedLength : Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionElementTypeBuilder * Nullable<bool> * bool -> bool
<Extension()>
Public Function CanSetFixedLength (elementTypeBuilder As IConventionElementTypeBuilder, fixedLength As Nullable(Of Boolean), Optional fromDataAnnotation As Boolean = false) As Boolean

參數

elementTypeBuilder
IConventionElementTypeBuilder

所設定專案的產生器。

fixedLength
Nullable<Boolean>

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

fromDataAnnotation
Boolean

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

傳回

true 如果專案可以設定為固定長度,則為 。

備註

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

適用於