RelationalPropertyBuilderExtensions.IsFixedLength 方法

定义

重载

IsFixedLength(PropertyBuilder, Boolean)

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

IsFixedLength(IConventionPropertyBuilder, Nullable<Boolean>, Boolean)

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

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

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

IsFixedLength(PropertyBuilder, Boolean)

Source:
RelationalPropertyBuilderExtensions.cs
Source:
RelationalPropertyBuilderExtensions.cs
Source:
RelationalPropertyBuilderExtensions.cs
Source:
RelationalPropertyBuilderExtensions.cs
Source:
RelationalPropertyBuilderExtensions.cs
Source:
RelationalPropertyBuilderExtensions.cs
Source:
RelationalPropertyBuilderExtensions.cs
Source:
RelationalPropertyBuilderExtensions.cs
Source:
RelationalPropertyBuilderExtensions.cs

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

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

参数

propertyBuilder
PropertyBuilder

要配置的属性的生成器。

fixedLength
Boolean

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

返回

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

注解

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

适用于

IsFixedLength(IConventionPropertyBuilder, Nullable<Boolean>, Boolean)

Source:
RelationalPropertyBuilderExtensions.cs
Source:
RelationalPropertyBuilderExtensions.cs
Source:
RelationalPropertyBuilderExtensions.cs
Source:
RelationalPropertyBuilderExtensions.cs
Source:
RelationalPropertyBuilderExtensions.cs
Source:
RelationalPropertyBuilderExtensions.cs
Source:
RelationalPropertyBuilderExtensions.cs

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

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

参数

propertyBuilder
IConventionPropertyBuilder

要配置的属性的生成器。

fixedLength
Nullable<Boolean>

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

fromDataAnnotation
Boolean

指示是否使用数据注释指定配置。

返回

如果应用了配置,则为同一生成器实例, null 否则为 。

注解

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

适用于

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

Source:
RelationalPropertyBuilderExtensions.cs
Source:
RelationalPropertyBuilderExtensions.cs
Source:
RelationalPropertyBuilderExtensions.cs
Source:
RelationalPropertyBuilderExtensions.cs
Source:
RelationalPropertyBuilderExtensions.cs
Source:
RelationalPropertyBuilderExtensions.cs
Source:
RelationalPropertyBuilderExtensions.cs
Source:
RelationalPropertyBuilderExtensions.cs
Source:
RelationalPropertyBuilderExtensions.cs

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

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

类型参数

TProperty

要配置的属性的类型。

参数

propertyBuilder
PropertyBuilder<TProperty>

要配置的属性的生成器。

fixedLength
Boolean

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

返回

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

注解

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

适用于