RelationalComplexTypePropertyBuilderExtensions.IsFixedLength 方法

定义

重载

IsFixedLength(ComplexTypePropertyBuilder, Boolean)

将 属性配置为能够仅存储固定长度的数据,例如字符串。

IsFixedLength<TProperty>(ComplexTypePropertyBuilder<TProperty>, Boolean)

将 属性配置为能够仅存储固定长度的数据,例如字符串。

IsFixedLength(ComplexTypePropertyBuilder, Boolean)

将 属性配置为能够仅存储固定长度的数据,例如字符串。

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

参数

propertyBuilder
ComplexTypePropertyBuilder

要配置的属性的生成器。

fixedLength
Boolean

一个值,该值指示属性是否受固定长度值的约束。

返回

同一个生成器实例,以便可以链接多个配置调用。

注解

有关详细信息和示例,请参阅 为实体类型和关系建模

适用于

IsFixedLength<TProperty>(ComplexTypePropertyBuilder<TProperty>, Boolean)

将 属性配置为能够仅存储固定长度的数据,例如字符串。

public static Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexTypePropertyBuilder<TProperty> IsFixedLength<TProperty> (this Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexTypePropertyBuilder<TProperty> propertyBuilder, bool fixedLength = true);
static member IsFixedLength : Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexTypePropertyBuilder<'Property> * bool -> Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexTypePropertyBuilder<'Property>
<Extension()>
Public Function IsFixedLength(Of TProperty) (propertyBuilder As ComplexTypePropertyBuilder(Of TProperty), Optional fixedLength As Boolean = true) As ComplexTypePropertyBuilder(Of TProperty)

类型参数

TProperty

要配置的属性的类型。

参数

propertyBuilder
ComplexTypePropertyBuilder<TProperty>

要配置的属性的生成器。

fixedLength
Boolean

一个值,该值指示属性是否受固定长度值的约束。

返回

同一个生成器实例,以便可以链接多个配置调用。

注解

有关详细信息和示例,请参阅 为实体类型和关系建模

适用于