RelationalComplexTypePropertyBuilderExtensions.HasColumnType 方法

定义

重载

HasColumnType(ComplexTypePropertyBuilder, String)

配置属性在面向关系数据库时映射到的列的数据类型。 这应该是完整的类型名称,包括精度、小数位数、长度等。

HasColumnType<TProperty>(ComplexTypePropertyBuilder<TProperty>, String)

配置属性在面向关系数据库时映射到的列的数据类型。 这应该是完整的类型名称,包括精度、小数位数、长度等。

HasColumnType(ComplexTypePropertyBuilder, String)

配置属性在面向关系数据库时映射到的列的数据类型。 这应该是完整的类型名称,包括精度、小数位数、长度等。

public static Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexTypePropertyBuilder HasColumnType (this Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexTypePropertyBuilder propertyBuilder, string? typeName);
static member HasColumnType : Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexTypePropertyBuilder * string -> Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexTypePropertyBuilder
<Extension()>
Public Function HasColumnType (propertyBuilder As ComplexTypePropertyBuilder, typeName As String) As ComplexTypePropertyBuilder

参数

propertyBuilder
ComplexTypePropertyBuilder

要配置的属性的生成器。

typeName
String

列的数据类型的名称。

返回

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

注解

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

适用于

HasColumnType<TProperty>(ComplexTypePropertyBuilder<TProperty>, String)

配置属性在面向关系数据库时映射到的列的数据类型。 这应该是完整的类型名称,包括精度、小数位数、长度等。

public static Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexTypePropertyBuilder<TProperty> HasColumnType<TProperty> (this Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexTypePropertyBuilder<TProperty> propertyBuilder, string? typeName);
static member HasColumnType : Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexTypePropertyBuilder<'Property> * string -> Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexTypePropertyBuilder<'Property>
<Extension()>
Public Function HasColumnType(Of TProperty) (propertyBuilder As ComplexTypePropertyBuilder(Of TProperty), typeName As String) As ComplexTypePropertyBuilder(Of TProperty)

类型参数

TProperty

要配置的属性的类型。

参数

propertyBuilder
ComplexTypePropertyBuilder<TProperty>

要配置的属性的生成器。

typeName
String

列的数据类型的名称。

返回

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

注解

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

适用于