Table of Contents

Class ColumnOperation

Namespace
Microsoft.EntityFrameworkCore.Migrations.Operations
Assembly
Microsoft.EntityFrameworkCore.Relational.dll

A MigrationOperation for operations on columns. See also AddColumnOperation and AlterColumnOperation.

public abstract class ColumnOperation : MigrationOperation, ITableMigrationOperation
Inheritance
ColumnOperation
Implements
Derived
Inherited Members

Constructors

ColumnOperation()

protected ColumnOperation()

Properties

ClrType

The CLR Type of the property or properties mapped to the column.

public virtual Type ClrType { get; set; }

Property Value

Type

Collation

The collation for this column, or null if one hasn't been explicitly configured.

public virtual string Collation { get; set; }

Property Value

string

ColumnType

The store type of the column--for example, 'nvarchar(max)'.

public virtual string ColumnType { get; set; }

Property Value

string

Comment

Comment for this column

public virtual string Comment { get; set; }

Property Value

string

ComputedColumnSql

The SQL expression to use to compute the column value, null if the column is not computed.

public virtual string ComputedColumnSql { get; set; }

Property Value

string

DefaultValue

The default value for rows inserted without an explicit value for this column, or null if there is no default.

public virtual object DefaultValue { get; set; }

Property Value

object

DefaultValueSql

The SQL expression to use as the default constraint when creating the column, or null if there is no default constraint.

public virtual string DefaultValueSql { get; set; }

Property Value

string

IsFixedLength

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

public virtual bool? IsFixedLength { get; set; }

Property Value

bool?

IsNullable

Indicates whether or not th column can store null values.

public virtual bool IsNullable { get; set; }

Property Value

bool

IsRowVersion

Indicates whether or not this column acts as an automatic concurrency token in the same vein as 'rowversion'/'timestamp' columns on SQL Server.

public virtual bool IsRowVersion { get; set; }

Property Value

bool

IsStored

Whether the value of the computed column this property is mapped to is stored in the database, or calculated when it is read.

public virtual bool? IsStored { get; set; }

Property Value

bool?

IsUnicode

Indicates whether or not the column can contain Unicode data, or null if this is not specified or does not apply to this column type.

public virtual bool? IsUnicode { get; set; }

Property Value

bool?

MaxLength

The maximum amount of data that the column can store, or null if this is not specified or does not apply to this column type.

public virtual int? MaxLength { get; set; }

Property Value

int?

Name

The name of the column.

public virtual string Name { get; set; }

Property Value

string

Precision

The maximum number of digits that the column can store, or null if this is not specified or does not apply to this column type.

public virtual int? Precision { get; set; }

Property Value

int?

Scale

The maximum number of decimal places that the column can store, or null if this is not specified or does not apply to this column type.

public virtual int? Scale { get; set; }

Property Value

int?

Schema

The schema that contains the table, or null if the default schema should be used.

public virtual string Schema { get; set; }

Property Value

string

Table

The table which contains the column.

public virtual string Table { get; set; }

Property Value

string