Share via


ColumnsBuilder.Column Method

Definition

Overloads

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

Adds a AddColumnOperation to the CreateTableOperation.

Note that for nullable parameters a null value means not-specified.

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

Adds a AddColumnOperation to the CreateTableOperation.

Note that for nullable parameters a null value means not-specified.

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

Adds a AddColumnOperation to the CreateTableOperation.

Note that for nullable parameters a null value means not-specified.

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

Adds a AddColumnOperation to the CreateTableOperation.

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

Source:
ColumnsBuilder.cs
Source:
ColumnsBuilder.cs

Adds a AddColumnOperation to the CreateTableOperation.

Note that for nullable parameters a null value means not-specified.

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)

Type Parameters

T

The CLR type of the column.

Parameters

type
String

The database type of the column.

unicode
Nullable<Boolean>

Indicates whether or not the column will store Unicode data.

maxLength
Nullable<Int32>

The maximum length for data in the column.

rowVersion
Boolean

Indicates whether or not the column will act as a rowversion/timestamp concurrency token.

name
String

The column name.

nullable
Boolean

Indicates whether or not th column can store NULL values.

defaultValue
Object

The default value for the column.

defaultValueSql
String

The SQL expression to use for the column's default constraint.

computedColumnSql
String

The SQL expression to use to compute the column value.

Returns

The same builder so that multiple calls can be chained.

Applies to

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

Source:
ColumnsBuilder.cs
Source:
ColumnsBuilder.cs

Adds a AddColumnOperation to the CreateTableOperation.

Note that for nullable parameters a null value means not-specified.

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)

Type Parameters

T

The CLR type of the column.

Parameters

type
String

The database type of the column.

unicode
Nullable<Boolean>

Indicates whether or not the column will store Unicode data.

maxLength
Nullable<Int32>

The maximum length for data in the column.

rowVersion
Boolean

Indicates whether or not the column will act as a rowversion/timestamp concurrency token.

name
String

The column name.

nullable
Boolean

Indicates whether or not th column can store NULL values.

defaultValue
Object

The default value for the column.

defaultValueSql
String

The SQL expression to use for the column's default constraint.

computedColumnSql
String

The SQL expression to use to compute the column value.

fixedLength
Nullable<Boolean>

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

Returns

The same builder so that multiple calls can be chained.

Applies to

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

Source:
ColumnsBuilder.cs
Source:
ColumnsBuilder.cs

Adds a AddColumnOperation to the CreateTableOperation.

Note that for nullable parameters a null value means not-specified.

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)

Type Parameters

T

The CLR type of the column.

Parameters

type
String

The database type of the column.

unicode
Nullable<Boolean>

Indicates whether or not the column will store Unicode data.

maxLength
Nullable<Int32>

The maximum length for data in the column.

rowVersion
Boolean

Indicates whether or not the column will act as a rowversion/timestamp concurrency token.

name
String

The column name.

nullable
Boolean

Indicates whether or not the column can store NULL values.

defaultValue
Object

The default value for the column.

defaultValueSql
String

The SQL expression to use for the column's default constraint.

computedColumnSql
String

The SQL expression to use to compute the column value.

fixedLength
Nullable<Boolean>

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

comment
String

A comment to be applied to the table.

Returns

The same builder so that multiple calls can be chained.

Applies to

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

Source:
ColumnsBuilder.cs
Source:
ColumnsBuilder.cs
Source:
ColumnsBuilder.cs
Source:
ColumnsBuilder.cs
Source:
ColumnsBuilder.cs
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)

Type Parameters

T

The CLR type of the column.

Parameters

type
String

The database type of the column.

unicode
Nullable<Boolean>

Indicates whether or not the column will store Unicode data.

maxLength
Nullable<Int32>

The maximum length for data in the column.

rowVersion
Boolean

Indicates whether or not the column will act as a rowversion/timestamp concurrency token.

name
String

The column name.

nullable
Boolean

Indicates whether or not the column can store null values.

defaultValue
Object

The default value for the column.

defaultValueSql
String

The SQL expression to use for the column's default constraint.

computedColumnSql
String

The SQL expression to use to compute the column value.

fixedLength
Nullable<Boolean>

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

comment
String

A comment to be applied to the column.

collation
String

A collation to be applied to the column.

precision
Nullable<Int32>

The maximum number of digits for data in the column.

scale
Nullable<Int32>

The maximum number of decimal places for data in the column.

stored
Nullable<Boolean>

Whether the value of the computed column is stored in the database or not.

Returns

The same builder so that multiple calls can be chained.

Remarks

Note that for nullable parameters a null value means not-specified.

Applies to