ConventionPropertyExtensions.SetMaxLength Método

Definición

Establece la longitud máxima de los datos permitidos en esta propiedad. Por ejemplo, si la propiedad es " String , este es el número máximo de caracteres.

public static void SetMaxLength (this Microsoft.EntityFrameworkCore.Metadata.IConventionProperty property, int? maxLength, bool fromDataAnnotation = false);
public static int? SetMaxLength (this Microsoft.EntityFrameworkCore.Metadata.IConventionProperty property, int? maxLength, bool fromDataAnnotation = false);
static member SetMaxLength : Microsoft.EntityFrameworkCore.Metadata.IConventionProperty * Nullable<int> * bool -> unit
static member SetMaxLength : Microsoft.EntityFrameworkCore.Metadata.IConventionProperty * Nullable<int> * bool -> Nullable<int>
<Extension()>
Public Sub SetMaxLength (property As IConventionProperty, maxLength As Nullable(Of Integer), Optional fromDataAnnotation As Boolean = false)
<Extension()>
Public Function SetMaxLength (property As IConventionProperty, maxLength As Nullable(Of Integer), Optional fromDataAnnotation As Boolean = false) As Nullable(Of Integer)

Parámetros

property
IConventionProperty

Propiedad de la que se va a establecer la longitud máxima.

maxLength
Nullable<Int32>

Longitud máxima de los datos permitidos en esta propiedad.

fromDataAnnotation
Boolean

Indica si la configuración se especificó mediante una anotación de datos.

Devoluciones

Propiedad configurada.

Se aplica a