Share via


IConventionElementTypeBuilder.CanSetMaxLength Method

Definition

Returns a value indicating whether the maximum length of elements can be set from the current configuration source.

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

Parameters

maxLength
Nullable<Int32>

The maximum length of elements in the collection.

fromDataAnnotation
Boolean

Indicates whether the configuration was specified using a data annotation.

Returns

true if the maximum length of data allowed can be set for the elements.

Applies to