IConventionElementTypeBuilder.HasMaxLength Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Configures the maximum length of data that can be stored in elements of the collection.
public Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionElementTypeBuilder? HasMaxLength (int? maxLength, bool fromDataAnnotation = false);
abstract member HasMaxLength : Nullable<int> * bool -> Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionElementTypeBuilder
Public Function HasMaxLength (maxLength As Nullable(Of Integer), Optional fromDataAnnotation As Boolean = false) As IConventionElementTypeBuilder
Parameters
The maximum length of data allowed in elements of the collection. A value of -1
indicates that elements of the
collection have no maximum length.
- fromDataAnnotation
- Boolean
Indicates whether the configuration was specified using a data annotation.
Returns
The same builder instance if the configuration was applied,
null
otherwise.
Applies to
Entity Framework