ColumnsBuilder.Column 方法

定义

重载

Column<T>(String, Nullable<Boolean>, Nullable<Int32>, Boolean, String, Boolean, Object, String, String)

AddColumnOperation 中添加一个 CreateTableOperation

请注意,对于可以为 null 的参数, null 值表示未指定。

Column<T>(String, Nullable<Boolean>, Nullable<Int32>, Boolean, String, Boolean, Object, String, String, Nullable<Boolean>)

AddColumnOperation 中添加一个 CreateTableOperation

请注意,对于可以为 null 的参数, null 值表示未指定。

Column<T>(String, Nullable<Boolean>, Nullable<Int32>, Boolean, String, Boolean, Object, String, String, Nullable<Boolean>, String)

AddColumnOperation 中添加一个 CreateTableOperation

请注意,对于可以为 null 的参数, null 值表示未指定。

Column<T>(String, Nullable<Boolean>, Nullable<Int32>, Boolean, String, Boolean, Object, String, String, Nullable<Boolean>, String, String, Nullable<Int32>, Nullable<Int32>, Nullable<Boolean>)

AddColumnOperation 中添加一个 CreateTableOperation

Column<T>(String, Nullable<Boolean>, Nullable<Int32>, Boolean, String, Boolean, Object, String, String)

AddColumnOperation 中添加一个 CreateTableOperation

请注意,对于可以为 null 的参数, null 值表示未指定。

public virtual Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.AddColumnOperation> Column<T> (string type = default, bool? unicode = default, int? maxLength = default, bool rowVersion = false, string name = default, bool nullable = false, object defaultValue = default, string defaultValueSql = default, string computedColumnSql = default);
public virtual Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.AddColumnOperation> Column<T> (string type, bool? unicode, int? maxLength, bool rowVersion, string name, bool nullable, object defaultValue, string defaultValueSql, string computedColumnSql);
abstract member Column : string * Nullable<bool> * Nullable<int> * bool * string * bool * obj * string * string -> Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.AddColumnOperation>
override this.Column : string * Nullable<bool> * Nullable<int> * bool * string * bool * obj * string * string -> Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.AddColumnOperation>
Public Overridable Function Column(Of T) (Optional type As String = Nothing, Optional unicode As Nullable(Of Boolean) = Nothing, Optional maxLength As Nullable(Of Integer) = Nothing, Optional rowVersion As Boolean = false, Optional name As String = Nothing, Optional nullable As Boolean = false, Optional defaultValue As Object = Nothing, Optional defaultValueSql As String = Nothing, Optional computedColumnSql As String = Nothing) As OperationBuilder(Of AddColumnOperation)
Public Overridable Function Column(Of T) (type As String, unicode As Nullable(Of Boolean), maxLength As Nullable(Of Integer), rowVersion As Boolean, name As String, nullable As Boolean, defaultValue As Object, defaultValueSql As String, computedColumnSql As String) As OperationBuilder(Of AddColumnOperation)

类型参数

T

列的 CLR 类型。

参数

type
String

列的数据库类型。

unicode
Nullable<Boolean>

指示列是否将存储 Unicode 数据。

maxLength
Nullable<Int32>

列中数据的最大长度。

rowVersion
Boolean

指示列是否将充当 rowversion/timestamp 并发令牌。

name
String

列名称。

nullable
Boolean

指示该列是否可以存储 NULL 值。

defaultValue
Object

列的默认值。

defaultValueSql
String

要用于列的默认约束的 SQL 表达式。

computedColumnSql
String

用于计算列值的 SQL 表达式。

返回

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

适用于

Column<T>(String, Nullable<Boolean>, Nullable<Int32>, Boolean, String, Boolean, Object, String, String, Nullable<Boolean>)

AddColumnOperation 中添加一个 CreateTableOperation

请注意,对于可以为 null 的参数, null 值表示未指定。

public virtual Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.AddColumnOperation> Column<T> (string type = default, bool? unicode = default, int? maxLength = default, bool rowVersion = false, string name = default, bool nullable = false, object defaultValue = default, string defaultValueSql = default, string computedColumnSql = default, bool? fixedLength = default);
abstract member Column : string * Nullable<bool> * Nullable<int> * bool * string * bool * obj * string * string * Nullable<bool> -> Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.AddColumnOperation>
override this.Column : string * Nullable<bool> * Nullable<int> * bool * string * bool * obj * string * string * Nullable<bool> -> Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.AddColumnOperation>
Public Overridable Function Column(Of T) (Optional type As String = Nothing, Optional unicode As Nullable(Of Boolean) = Nothing, Optional maxLength As Nullable(Of Integer) = Nothing, Optional rowVersion As Boolean = false, Optional name As String = Nothing, Optional nullable As Boolean = false, Optional defaultValue As Object = Nothing, Optional defaultValueSql As String = Nothing, Optional computedColumnSql As String = Nothing, Optional fixedLength As Nullable(Of Boolean) = Nothing) As OperationBuilder(Of AddColumnOperation)

类型参数

T

列的 CLR 类型。

参数

type
String

列的数据库类型。

unicode
Nullable<Boolean>

指示列是否将存储 Unicode 数据。

maxLength
Nullable<Int32>

列中数据的最大长度。

rowVersion
Boolean

指示列是否将充当 rowversion/timestamp 并发令牌。

name
String

列名称。

nullable
Boolean

指示该列是否可以存储 NULL 值。

defaultValue
Object

列的默认值。

defaultValueSql
String

要用于列的默认约束的 SQL 表达式。

computedColumnSql
String

用于计算列值的 SQL 表达式。

fixedLength
Nullable<Boolean>

指示列是否受固定长度数据的约束。

返回

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

适用于

Column<T>(String, Nullable<Boolean>, Nullable<Int32>, Boolean, String, Boolean, Object, String, String, Nullable<Boolean>, String)

AddColumnOperation 中添加一个 CreateTableOperation

请注意,对于可以为 null 的参数, null 值表示未指定。

public virtual Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.AddColumnOperation> Column<T> (string type = default, bool? unicode = default, int? maxLength = default, bool rowVersion = false, string name = default, bool nullable = false, object defaultValue = default, string defaultValueSql = default, string computedColumnSql = default, bool? fixedLength = default, string comment = default);
abstract member Column : string * Nullable<bool> * Nullable<int> * bool * string * bool * obj * string * string * Nullable<bool> * string -> Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.AddColumnOperation>
override this.Column : string * Nullable<bool> * Nullable<int> * bool * string * bool * obj * string * string * Nullable<bool> * string -> Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.AddColumnOperation>
Public Overridable Function Column(Of T) (Optional type As String = Nothing, Optional unicode As Nullable(Of Boolean) = Nothing, Optional maxLength As Nullable(Of Integer) = Nothing, Optional rowVersion As Boolean = false, Optional name As String = Nothing, Optional nullable As Boolean = false, Optional defaultValue As Object = Nothing, Optional defaultValueSql As String = Nothing, Optional computedColumnSql As String = Nothing, Optional fixedLength As Nullable(Of Boolean) = Nothing, Optional comment As String = Nothing) As OperationBuilder(Of AddColumnOperation)

类型参数

T

列的 CLR 类型。

参数

type
String

列的数据库类型。

unicode
Nullable<Boolean>

指示列是否将存储 Unicode 数据。

maxLength
Nullable<Int32>

列中数据的最大长度。

rowVersion
Boolean

指示列是否将充当 rowversion/timestamp 并发令牌。

name
String

列名称。

nullable
Boolean

指示列是否可以存储 NULL 值。

defaultValue
Object

列的默认值。

defaultValueSql
String

要用于列的默认约束的 SQL 表达式。

computedColumnSql
String

用于计算列值的 SQL 表达式。

fixedLength
Nullable<Boolean>

指示列是否受固定长度数据的约束。

comment
String

要应用于表的注释。

返回

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

适用于

Column<T>(String, Nullable<Boolean>, Nullable<Int32>, Boolean, String, Boolean, Object, String, String, Nullable<Boolean>, String, String, Nullable<Int32>, Nullable<Int32>, Nullable<Boolean>)

AddColumnOperation 中添加一个 CreateTableOperation

public virtual Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.AddColumnOperation> Column<T> (string type = default, bool? unicode = default, int? maxLength = default, bool rowVersion = false, string name = default, bool nullable = false, object defaultValue = default, string defaultValueSql = default, string computedColumnSql = default, bool? fixedLength = default, string comment = default, string collation = default, int? precision = default, int? scale = default, bool? stored = default);
public virtual Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.AddColumnOperation> Column<T> (string? type = default, bool? unicode = default, int? maxLength = default, bool rowVersion = false, string? name = default, bool nullable = false, object? defaultValue = default, string? defaultValueSql = default, string? computedColumnSql = default, bool? fixedLength = default, string? comment = default, string? collation = default, int? precision = default, int? scale = default, bool? stored = default);
abstract member Column : string * Nullable<bool> * Nullable<int> * bool * string * bool * obj * string * string * Nullable<bool> * string * string * Nullable<int> * Nullable<int> * Nullable<bool> -> Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.AddColumnOperation>
override this.Column : string * Nullable<bool> * Nullable<int> * bool * string * bool * obj * string * string * Nullable<bool> * string * string * Nullable<int> * Nullable<int> * Nullable<bool> -> Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.AddColumnOperation>
Public Overridable Function Column(Of T) (Optional type As String = Nothing, Optional unicode As Nullable(Of Boolean) = Nothing, Optional maxLength As Nullable(Of Integer) = Nothing, Optional rowVersion As Boolean = false, Optional name As String = Nothing, Optional nullable As Boolean = false, Optional defaultValue As Object = Nothing, Optional defaultValueSql As String = Nothing, Optional computedColumnSql As String = Nothing, Optional fixedLength As Nullable(Of Boolean) = Nothing, Optional comment As String = Nothing, Optional collation As String = Nothing, Optional precision As Nullable(Of Integer) = Nothing, Optional scale As Nullable(Of Integer) = Nothing, Optional stored As Nullable(Of Boolean) = Nothing) As OperationBuilder(Of AddColumnOperation)

类型参数

T

列的 CLR 类型。

参数

type
String

列的数据库类型。

unicode
Nullable<Boolean>

指示列是否将存储 Unicode 数据。

maxLength
Nullable<Int32>

列中数据的最大长度。

rowVersion
Boolean

指示列是否将充当 rowversion/timestamp 并发令牌。

name
String

列名称。

nullable
Boolean

指示列是否可以存储 null 值。

defaultValue
Object

列的默认值。

defaultValueSql
String

要用于列的默认约束的 SQL 表达式。

computedColumnSql
String

用于计算列值的 SQL 表达式。

fixedLength
Nullable<Boolean>

指示列是否受固定长度数据的约束。

comment
String

要应用于列的注释。

collation
String

要应用于列的排序规则。

precision
Nullable<Int32>

列中数据的最大位数。

scale
Nullable<Int32>

列中数据的最大小数位数。

stored
Nullable<Boolean>

计算列的值是否存储在数据库中。

返回

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

注解

请注意,对于可以为 null 的参数, null 值表示未指定。

适用于