IConventionProperty.SetMaxLength(Nullable<Int32>, Boolean) Méthode

Définition

Définit la longueur maximale des données autorisées dans cette propriété. Par exemple, si la propriété est un String ' , il s’agit du nombre maximal de caractères.

public int? SetMaxLength (int? maxLength, bool fromDataAnnotation = false);
abstract member SetMaxLength : Nullable<int> * bool -> Nullable<int>
Public Function SetMaxLength (maxLength As Nullable(Of Integer), Optional fromDataAnnotation As Boolean = false) As Nullable(Of Integer)

Paramètres

maxLength
Nullable<Int32>

Longueur maximale des données autorisée dans cette propriété.

fromDataAnnotation
Boolean

Indique si la configuration a été spécifiée à l’aide d’une annotation de données.

Retours

Propriété configurée.

S’applique à