RelationalPropertyExtensions.GetMaxLength 方法

定義

多載

GetMaxLength(IReadOnlyProperty, StoreObjectIdentifier)

取得這個屬性中允許的資料長度上限。 例如,如果 屬性是 String ,則這是字元數目上限。

GetMaxLength(IProperty, StoreObjectIdentifier)

取得這個屬性中允許的資料長度上限。 例如,如果 屬性是 String ,則這是字元數目上限。

GetMaxLength(IReadOnlyProperty, StoreObjectIdentifier)

取得這個屬性中允許的資料長度上限。 例如,如果 屬性是 String ,則這是字元數目上限。

public static int? GetMaxLength (this Microsoft.EntityFrameworkCore.Metadata.IReadOnlyProperty property, in Microsoft.EntityFrameworkCore.Metadata.StoreObjectIdentifier storeObject);
static member GetMaxLength : Microsoft.EntityFrameworkCore.Metadata.IReadOnlyProperty * StoreObjectIdentifier -> Nullable<int>
<Extension()>
Public Function GetMaxLength (property As IReadOnlyProperty, ByRef storeObject As StoreObjectIdentifier) As Nullable(Of Integer)

參數

property
IReadOnlyProperty

屬性。

storeObject
StoreObjectIdentifier

包含資料行之類似資料表的存放區物件的識別碼。

傳回

長度上限,如果未定義任何長度,則 null 為 。

適用於

GetMaxLength(IProperty, StoreObjectIdentifier)

取得這個屬性中允許的資料長度上限。 例如,如果 屬性是 String ,則這是字元數目上限。

public static int? GetMaxLength (this Microsoft.EntityFrameworkCore.Metadata.IProperty property, in Microsoft.EntityFrameworkCore.Metadata.StoreObjectIdentifier storeObject);
static member GetMaxLength : Microsoft.EntityFrameworkCore.Metadata.IProperty * StoreObjectIdentifier -> Nullable<int>
<Extension()>
Public Function GetMaxLength (property As IProperty, ByRef storeObject As StoreObjectIdentifier) As Nullable(Of Integer)

參數

property
IProperty

屬性。

storeObject
StoreObjectIdentifier

包含資料行之類似資料表的存放區物件的識別碼。

傳回

最大長度,如果未定義,則 null 為 。

適用於