MigrationsSqlGenerator.GetColumnType Method

Definition

Overloads

GetColumnType(String, String, String, ColumnOperation, IModel)

Gets the store/database type of a column given the provided metadata.

GetColumnType(String, String, String, Type, Nullable<Boolean>, Nullable<Int32>, Boolean, IModel)

Gets the store/database type of a column given the provided metadata.

GetColumnType(String, String, String, Type, Nullable<Boolean>, Nullable<Int32>, Nullable<Boolean>, Boolean, IModel)

Gets the store/database type of a column given the provided metadata.

GetColumnType(String, String, String, ColumnOperation, IModel)

Gets the store/database type of a column given the provided metadata.

protected virtual string GetColumnType (string schema, string table, string name, Microsoft.EntityFrameworkCore.Migrations.Operations.ColumnOperation operation, Microsoft.EntityFrameworkCore.Metadata.IModel model);
protected virtual string GetColumnType (string schema, string tableName, string name, Microsoft.EntityFrameworkCore.Migrations.Operations.ColumnOperation operation, Microsoft.EntityFrameworkCore.Metadata.IModel model);
protected virtual string? GetColumnType (string? schema, string tableName, string name, Microsoft.EntityFrameworkCore.Migrations.Operations.ColumnOperation operation, Microsoft.EntityFrameworkCore.Metadata.IModel? model);
abstract member GetColumnType : string * string * string * Microsoft.EntityFrameworkCore.Migrations.Operations.ColumnOperation * Microsoft.EntityFrameworkCore.Metadata.IModel -> string
override this.GetColumnType : string * string * string * Microsoft.EntityFrameworkCore.Migrations.Operations.ColumnOperation * Microsoft.EntityFrameworkCore.Metadata.IModel -> string
abstract member GetColumnType : string * string * string * Microsoft.EntityFrameworkCore.Migrations.Operations.ColumnOperation * Microsoft.EntityFrameworkCore.Metadata.IModel -> string
override this.GetColumnType : string * string * string * Microsoft.EntityFrameworkCore.Migrations.Operations.ColumnOperation * Microsoft.EntityFrameworkCore.Metadata.IModel -> string
Protected Overridable Function GetColumnType (schema As String, table As String, name As String, operation As ColumnOperation, model As IModel) As String
Protected Overridable Function GetColumnType (schema As String, tableName As String, name As String, operation As ColumnOperation, model As IModel) As String

Parameters

schema
String

The schema that contains the table, or null to use the default schema.

tabletableName
String

The table that contains the column.

name
String

The column name.

operation
ColumnOperation

The column metadata.

model
IModel

The target model which may be null if the operations exist without a model.

Returns

The database/store type for the column.

Applies to

GetColumnType(String, String, String, Type, Nullable<Boolean>, Nullable<Int32>, Boolean, IModel)

Gets the store/database type of a column given the provided metadata.

protected virtual string GetColumnType (string schema, string table, string name, Type clrType, bool? unicode, int? maxLength, bool rowVersion, Microsoft.EntityFrameworkCore.Metadata.IModel model);
abstract member GetColumnType : string * string * string * Type * Nullable<bool> * Nullable<int> * bool * Microsoft.EntityFrameworkCore.Metadata.IModel -> string
override this.GetColumnType : string * string * string * Type * Nullable<bool> * Nullable<int> * bool * Microsoft.EntityFrameworkCore.Metadata.IModel -> string
Protected Overridable Function GetColumnType (schema As String, table As String, name As String, clrType As Type, unicode As Nullable(Of Boolean), maxLength As Nullable(Of Integer), rowVersion As Boolean, model As IModel) As String

Parameters

schema
String

The schema that contains the table, or null to use the default schema.

table
String

The table that contains the column.

name
String

The column name.

clrType
Type

The CLR Type that the column is mapped to.

unicode
Nullable<Boolean>

Indicates whether or not the column can contain Unicode data, or null if this is not applicable or not specified.

maxLength
Nullable<Int32>

The maximum amount of data that the column can contain, or null if this is not applicable or not specified.

rowVersion
Boolean

Indicates whether or not this column is an automatic concurrency token, such as a SQL Server timestamp/rowversion.

model
IModel

The target model which may be null if the operations exist without a model.

Returns

The database/store type for the column.

Applies to

GetColumnType(String, String, String, Type, Nullable<Boolean>, Nullable<Int32>, Nullable<Boolean>, Boolean, IModel)

Gets the store/database type of a column given the provided metadata.

protected virtual string GetColumnType (string schema, string table, string name, Type clrType, bool? unicode, int? maxLength, bool? fixedLength, bool rowVersion, Microsoft.EntityFrameworkCore.Metadata.IModel model);
abstract member GetColumnType : string * string * string * Type * Nullable<bool> * Nullable<int> * Nullable<bool> * bool * Microsoft.EntityFrameworkCore.Metadata.IModel -> string
override this.GetColumnType : string * string * string * Type * Nullable<bool> * Nullable<int> * Nullable<bool> * bool * Microsoft.EntityFrameworkCore.Metadata.IModel -> string
Protected Overridable Function GetColumnType (schema As String, table As String, name As String, clrType As Type, unicode As Nullable(Of Boolean), maxLength As Nullable(Of Integer), fixedLength As Nullable(Of Boolean), rowVersion As Boolean, model As IModel) As String

Parameters

schema
String

The schema that contains the table, or null to use the default schema.

table
String

The table that contains the column.

name
String

The column name.

clrType
Type

The CLR Type that the column is mapped to.

unicode
Nullable<Boolean>

Indicates whether or not the column can contain Unicode data, or null if this is not applicable or not specified.

maxLength
Nullable<Int32>

The maximum amount of data that the column can contain, or null if this is not applicable or not specified.

fixedLength
Nullable<Boolean>

Indicates whether or not the data is constrained to fixed-length data.

rowVersion
Boolean

Indicates whether or not this column is an automatic concurrency token, such as a SQL Server timestamp/rowversion.

model
IModel

The target model which may be null if the operations exist without a model.

Returns

The database/store type for the column.

Applies to