語言

RelationalPropertyBuilderExtensions.CanSetIsFixedLength 方法

定義

回傳一個值,表示該屬性是否可以設定為固定長度。

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

參數

propertyBuilder
IConventionPropertyBuilder

正在配置的物業的建商。

fixedLength
Nullable<Boolean>

一個表示該性質是否受限於固定長度值的值。

fromDataAnnotation
Boolean

表示配置是否以資料註解方式指定。

傳回

true 該屬性是否能設定為固定長度。

備註

更多資訊與範例請參閱 建模實體類型與關係 。

適用於