語言

PropertyMaxLengthConvention 類別

定義

慣例為支援長度面的屬性設定最大長度。 預設值是128。

public class PropertyMaxLengthConvention : System.Data.Entity.ModelConfiguration.Conventions.IConceptualModelConvention<System.Data.Entity.Core.Metadata.Edm.AssociationType>, System.Data.Entity.ModelConfiguration.Conventions.IConceptualModelConvention<System.Data.Entity.Core.Metadata.Edm.ComplexType>, System.Data.Entity.ModelConfiguration.Conventions.IConceptualModelConvention<System.Data.Entity.Core.Metadata.Edm.EntityType>
type PropertyMaxLengthConvention = class
    interface IConceptualModelConvention<EntityType>
    interface IConceptualModelConvention<ComplexType>
    interface IConceptualModelConvention<AssociationType>
    interface IConvention
Public Class PropertyMaxLengthConvention
Implements IConceptualModelConvention(Of AssociationType), IConceptualModelConvention(Of ComplexType), IConceptualModelConvention(Of EntityType)
繼承
PropertyMaxLengthConvention
實作

建構函式

名稱 Description
PropertyMaxLengthConvention()

初始化一個以預設長度 的新 PropertyMaxLengthConvention 實例。

PropertyMaxLengthConvention(Int32)

初始化一個以指定長度的新實例 PropertyMaxLengthConvention 。

方法

名稱 Description
Apply(AssociationType, DbModel)

將此慣例應用於模型中的一個項目。

Apply(ComplexType, DbModel)

將此慣例應用於模型中的一個項目。

Apply(EntityType, DbModel)

將此慣例應用於模型中的一個項目。

適用於