RelationalTypeMappingConfigurationBuilderExtensions.HasColumnType Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
HasColumnType(TypeMappingConfigurationBuilder, String) |
Configures the data type of the column that the scalar maps to when targeting a relational database. This should be the complete type name, including precision, scale, length, etc. |
HasColumnType<TScalar>(TypeMappingConfigurationBuilder<TScalar>, String) |
Configures the data type of the column that the scalar maps to when targeting a relational database. This should be the complete type name, including precision, scale, length, etc. |
HasColumnType(TypeMappingConfigurationBuilder, String)
Configures the data type of the column that the scalar maps to when targeting a relational database. This should be the complete type name, including precision, scale, length, etc.
public static Microsoft.EntityFrameworkCore.Metadata.Builders.TypeMappingConfigurationBuilder HasColumnType (this Microsoft.EntityFrameworkCore.Metadata.Builders.TypeMappingConfigurationBuilder scalarBuilder, string typeName);
static member HasColumnType : Microsoft.EntityFrameworkCore.Metadata.Builders.TypeMappingConfigurationBuilder * string -> Microsoft.EntityFrameworkCore.Metadata.Builders.TypeMappingConfigurationBuilder
<Extension()>
Public Function HasColumnType (scalarBuilder As TypeMappingConfigurationBuilder, typeName As String) As TypeMappingConfigurationBuilder
Parameters
- scalarBuilder
- TypeMappingConfigurationBuilder
The builder for the scalar being configured.
- typeName
- String
The name of the data type of the column.
Returns
The same builder instance so that multiple calls can be chained.
Remarks
See Modeling entity types and relationships for more information and examples.
Applies to
HasColumnType<TScalar>(TypeMappingConfigurationBuilder<TScalar>, String)
Configures the data type of the column that the scalar maps to when targeting a relational database. This should be the complete type name, including precision, scale, length, etc.
public static Microsoft.EntityFrameworkCore.Metadata.Builders.TypeMappingConfigurationBuilder<TScalar> HasColumnType<TScalar> (this Microsoft.EntityFrameworkCore.Metadata.Builders.TypeMappingConfigurationBuilder<TScalar> scalarBuilder, string typeName);
static member HasColumnType : Microsoft.EntityFrameworkCore.Metadata.Builders.TypeMappingConfigurationBuilder<'Scalar> * string -> Microsoft.EntityFrameworkCore.Metadata.Builders.TypeMappingConfigurationBuilder<'Scalar>
<Extension()>
Public Function HasColumnType(Of TScalar) (scalarBuilder As TypeMappingConfigurationBuilder(Of TScalar), typeName As String) As TypeMappingConfigurationBuilder(Of TScalar)
Type Parameters
- TScalar
The type of the scalar being configured.
Parameters
- scalarBuilder
- TypeMappingConfigurationBuilder<TScalar>
The builder for the scalar being configured.
- typeName
- String
The name of the data type of the column.
Returns
The same builder instance so that multiple calls can be chained.
Remarks
See Modeling entity types and relationships for more information and examples.
Applies to
Entity Framework
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for