ConventionPrimitivePropertyConfiguration.HasMaxLength Method (Int32)

 

Configures the property to have the specified maximum length.

Namespace:   System.Data.Entity.ModelConfiguration.Configuration
Assembly:  EntityFramework (in EntityFramework.dll)

public virtual ConventionPrimitivePropertyConfiguration HasMaxLength(
	int maxLength
)

Parameters

maxLength
Type: System.Int32

The maximum length for the property.

Calling this will have no effect once it has been configured. This method throws if the property does not have length facets.