共用方式為


MigrationsSqlGenerator.ColumnDefinition 方法

定義

多載

ColumnDefinition(AddColumnOperation, IModel, MigrationCommandListBuilder)

為 中的資料 AddColumnOperation 行定義產生 SQL 片段。

ColumnDefinition(String, String, String, ColumnOperation, IModel, MigrationCommandListBuilder)

為指定資料行中繼資料的資料行定義產生 SQL 片段。

ColumnDefinition(String, String, String, Type, String, Nullable<Boolean>, Nullable<Int32>, Boolean, Boolean, Object, String, String, IAnnotatable, IModel, MigrationCommandListBuilder)

為指定資料行中繼資料的資料行定義產生 SQL 片段。

ColumnDefinition(String, String, String, Type, String, Nullable<Boolean>, Nullable<Int32>, Nullable<Boolean>, Boolean, Boolean, Object, String, String, IAnnotatable, IModel, MigrationCommandListBuilder)

為指定資料行中繼資料的資料行定義產生 SQL 片段。

ColumnDefinition(AddColumnOperation, IModel, MigrationCommandListBuilder)

為 中的資料 AddColumnOperation 行定義產生 SQL 片段。

protected virtual void ColumnDefinition (Microsoft.EntityFrameworkCore.Migrations.Operations.AddColumnOperation operation, Microsoft.EntityFrameworkCore.Metadata.IModel model, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder);
protected virtual void ColumnDefinition (Microsoft.EntityFrameworkCore.Migrations.Operations.AddColumnOperation operation, Microsoft.EntityFrameworkCore.Metadata.IModel? model, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder);
abstract member ColumnDefinition : Microsoft.EntityFrameworkCore.Migrations.Operations.AddColumnOperation * Microsoft.EntityFrameworkCore.Metadata.IModel * Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder -> unit
override this.ColumnDefinition : Microsoft.EntityFrameworkCore.Migrations.Operations.AddColumnOperation * Microsoft.EntityFrameworkCore.Metadata.IModel * Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder -> unit
Protected Overridable Sub ColumnDefinition (operation As AddColumnOperation, model As IModel, builder As MigrationCommandListBuilder)

參數

operation
AddColumnOperation

作業。

model
IModel

目標模型,如果作業不存在模型,則可能 null 是。

builder
MigrationCommandListBuilder

用來加入 SQL 片段的命令產生器。

適用於

ColumnDefinition(String, String, String, ColumnOperation, IModel, MigrationCommandListBuilder)

為指定資料行中繼資料的資料行定義產生 SQL 片段。

protected virtual void ColumnDefinition (string schema, string table, string name, Microsoft.EntityFrameworkCore.Migrations.Operations.ColumnOperation operation, Microsoft.EntityFrameworkCore.Metadata.IModel model, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder);
protected virtual void ColumnDefinition (string? schema, string table, string name, Microsoft.EntityFrameworkCore.Migrations.Operations.ColumnOperation operation, Microsoft.EntityFrameworkCore.Metadata.IModel? model, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder);
abstract member ColumnDefinition : string * string * string * Microsoft.EntityFrameworkCore.Migrations.Operations.ColumnOperation * Microsoft.EntityFrameworkCore.Metadata.IModel * Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder -> unit
override this.ColumnDefinition : string * string * string * Microsoft.EntityFrameworkCore.Migrations.Operations.ColumnOperation * Microsoft.EntityFrameworkCore.Metadata.IModel * Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder -> unit
Protected Overridable Sub ColumnDefinition (schema As String, table As String, name As String, operation As ColumnOperation, model As IModel, builder As MigrationCommandListBuilder)

參數

schema
String

包含資料表的架構,或使用 null 預設架構。

table
String

包含資料行的資料表。

name
String

資料行名稱。

operation
ColumnOperation

資料行中繼資料。

model
IModel

目標模型,如果作業不存在模型,則可能 null 是。

builder
MigrationCommandListBuilder

用來加入 SQL 片段的命令產生器。

適用於

ColumnDefinition(String, String, String, Type, String, Nullable<Boolean>, Nullable<Int32>, Boolean, Boolean, Object, String, String, IAnnotatable, IModel, MigrationCommandListBuilder)

為指定資料行中繼資料的資料行定義產生 SQL 片段。

protected virtual void ColumnDefinition (string schema, string table, string name, Type clrType, string type, bool? unicode, int? maxLength, bool rowVersion, bool nullable, object defaultValue, string defaultValueSql, string computedColumnSql, Microsoft.EntityFrameworkCore.Infrastructure.IAnnotatable annotatable, Microsoft.EntityFrameworkCore.Metadata.IModel model, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder);
abstract member ColumnDefinition : string * string * string * Type * string * Nullable<bool> * Nullable<int> * bool * bool * obj * string * string * Microsoft.EntityFrameworkCore.Infrastructure.IAnnotatable * Microsoft.EntityFrameworkCore.Metadata.IModel * Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder -> unit
override this.ColumnDefinition : string * string * string * Type * string * Nullable<bool> * Nullable<int> * bool * bool * obj * string * string * Microsoft.EntityFrameworkCore.Infrastructure.IAnnotatable * Microsoft.EntityFrameworkCore.Metadata.IModel * Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder -> unit
Protected Overridable Sub ColumnDefinition (schema As String, table As String, name As String, clrType As Type, type As String, unicode As Nullable(Of Boolean), maxLength As Nullable(Of Integer), rowVersion As Boolean, nullable As Boolean, defaultValue As Object, defaultValueSql As String, computedColumnSql As String, annotatable As IAnnotatable, model As IModel, builder As MigrationCommandListBuilder)

參數

schema
String

包含資料表的架構,或使用 null 預設架構。

table
String

包含資料行的資料表。

name
String

資料行名稱。

clrType
Type

資料行所對應的 CLR Type

type
String

資料行的資料庫/存放區類型,如果沒有指定,則 null 為 。

unicode
Nullable<Boolean>

指出資料行是否可以包含 Unicode 資料,或者 null 如果不適用或未指定的話。

maxLength
Nullable<Int32>

資料行可包含的最大資料量, null 如果不適用或未指定,則為 。

rowVersion
Boolean

指出此資料行是否為自動並行權杖,例如時間戳記/rowversion SQL Server。

nullable
Boolean

指出資料行是否可以儲存 NULL 值。

defaultValue
Object

資料行的預設值。

defaultValueSql
String

要用於資料行之預設條件約束的 SQL 運算式。

computedColumnSql
String

用來計算資料行值的 SQL 運算式。

annotatable
IAnnotatable

MigrationOperation用來尋找任何自訂批註的 。

model
IModel

目標模型,如果作業不存在模型,則可能 null 是。

builder
MigrationCommandListBuilder

用來加入 SQL 片段的命令產生器。

適用於

ColumnDefinition(String, String, String, Type, String, Nullable<Boolean>, Nullable<Int32>, Nullable<Boolean>, Boolean, Boolean, Object, String, String, IAnnotatable, IModel, MigrationCommandListBuilder)

為指定資料行中繼資料的資料行定義產生 SQL 片段。

protected virtual void ColumnDefinition (string schema, string table, string name, Type clrType, string type, bool? unicode, int? maxLength, bool? fixedLength, bool rowVersion, bool nullable, object defaultValue, string defaultValueSql, string computedColumnSql, Microsoft.EntityFrameworkCore.Infrastructure.IAnnotatable annotatable, Microsoft.EntityFrameworkCore.Metadata.IModel model, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder);
abstract member ColumnDefinition : string * string * string * Type * string * Nullable<bool> * Nullable<int> * Nullable<bool> * bool * bool * obj * string * string * Microsoft.EntityFrameworkCore.Infrastructure.IAnnotatable * Microsoft.EntityFrameworkCore.Metadata.IModel * Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder -> unit
override this.ColumnDefinition : string * string * string * Type * string * Nullable<bool> * Nullable<int> * Nullable<bool> * bool * bool * obj * string * string * Microsoft.EntityFrameworkCore.Infrastructure.IAnnotatable * Microsoft.EntityFrameworkCore.Metadata.IModel * Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder -> unit
Protected Overridable Sub ColumnDefinition (schema As String, table As String, name As String, clrType As Type, type As String, unicode As Nullable(Of Boolean), maxLength As Nullable(Of Integer), fixedLength As Nullable(Of Boolean), rowVersion As Boolean, nullable As Boolean, defaultValue As Object, defaultValueSql As String, computedColumnSql As String, annotatable As IAnnotatable, model As IModel, builder As MigrationCommandListBuilder)

參數

schema
String

包含資料表的架構,或使用 null 預設架構。

table
String

包含資料行的資料表。

name
String

資料行名稱。

clrType
Type

資料行所對應的 CLR Type

type
String

資料行的資料庫/存放區類型,如果沒有指定,則 null 為 。

unicode
Nullable<Boolean>

指出資料行是否可以包含 Unicode 資料,或者 null 如果不適用或未指定的話。

maxLength
Nullable<Int32>

資料行可包含的最大資料量, null 如果不適用或未指定,則為 。

fixedLength
Nullable<Boolean>

指出資料行是否受限於固定長度的資料。

rowVersion
Boolean

指出此資料行是否為自動並行權杖,例如時間戳記/rowversion SQL Server。

nullable
Boolean

指出資料行是否可以儲存 NULL 值。

defaultValue
Object

資料行的預設值。

defaultValueSql
String

要用於資料行之預設條件約束的 SQL 運算式。

computedColumnSql
String

用來計算資料行值的 SQL 運算式。

annotatable
IAnnotatable

MigrationOperation用來尋找任何自訂批註的 。

model
IModel

目標模型,如果作業不存在模型,則可能 null 是。

builder
MigrationCommandListBuilder

用來加入 SQL 片段的命令產生器。

適用於