Share via


RelationalElementTypeBuilderExtensions.IsFixedLength Method

Definition

Overloads

IsFixedLength(ElementTypeBuilder, Boolean)

Configures the elements as capable of storing only fixed-length data, such as strings.

IsFixedLength(IConventionElementTypeBuilder, Nullable<Boolean>, Boolean)

Configures the elements as capable of storing only fixed-length data, such as strings.

IsFixedLength(ElementTypeBuilder, Boolean)

Configures the elements as capable of storing only fixed-length data, such as strings.

public static Microsoft.EntityFrameworkCore.Metadata.Builders.ElementTypeBuilder IsFixedLength (this Microsoft.EntityFrameworkCore.Metadata.Builders.ElementTypeBuilder elementTypeBuilder, bool fixedLength = true);
static member IsFixedLength : Microsoft.EntityFrameworkCore.Metadata.Builders.ElementTypeBuilder * bool -> Microsoft.EntityFrameworkCore.Metadata.Builders.ElementTypeBuilder
<Extension()>
Public Function IsFixedLength (elementTypeBuilder As ElementTypeBuilder, Optional fixedLength As Boolean = true) As ElementTypeBuilder

Parameters

elementTypeBuilder
ElementTypeBuilder

The builder for the elements being configured.

fixedLength
Boolean

A value indicating whether the elements are constrained to fixed length values.

Returns

The same builder instance so that multiple configuration calls can be chained.

Remarks

See Modeling entity types and relationships for more information and examples.

Applies to

IsFixedLength(IConventionElementTypeBuilder, Nullable<Boolean>, Boolean)

Configures the elements as capable of storing only fixed-length data, such as strings.

public static Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionElementTypeBuilder? IsFixedLength (this Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionElementTypeBuilder elementTypeBuilder, bool? fixedLength, bool fromDataAnnotation = false);
static member IsFixedLength : Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionElementTypeBuilder * Nullable<bool> * bool -> Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionElementTypeBuilder
<Extension()>
Public Function IsFixedLength (elementTypeBuilder As IConventionElementTypeBuilder, fixedLength As Nullable(Of Boolean), Optional fromDataAnnotation As Boolean = false) As IConventionElementTypeBuilder

Parameters

elementTypeBuilder
IConventionElementTypeBuilder

builder for the elements being configured.

fixedLength
Nullable<Boolean>

A value indicating whether the elements are constrained to fixed length values.

fromDataAnnotation
Boolean

Indicates whether the configuration was specified using a data annotation.

Returns

The same builder instance if the configuration was applied, null otherwise.

Remarks

See Modeling entity types and relationships for more information and examples.

Applies to