ColumnModel Class

Definition

Represents information about a column.

Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources (such as the end user of an application). If input is accepted from such sources it should be validated before being passed to these APIs to protect against SQL injection attacks etc.

public class ColumnModel : System.Data.Entity.Migrations.Model.PropertyModel
type ColumnModel = class
    inherit PropertyModel
Public Class ColumnModel
Inherits PropertyModel
Inheritance
ColumnModel
Inheritance
ColumnModel

Constructors

ColumnModel(PrimitiveTypeKind, TypeUsage)

Initializes a new instance of the ColumnModel class.

Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources (such as the end user of an application). If input is accepted from such sources it should be validated before being passed to these APIs to protect against SQL injection attacks etc.

ColumnModel(PrimitiveTypeKind, TypeUsage)

Initializes a new instance of the class.

ColumnModel(PrimitiveTypeKind)

Initializes a new instance of the ColumnModel class.

Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources (such as the end user of an application). If input is accepted from such sources it should be validated before being passed to these APIs to protect against SQL injection attacks etc.

ColumnModel(PrimitiveTypeKind)

Initializes a new instance of the class.

Properties

Annotations

Gets or sets the custom annotations that have changed on the column.

ClrDefaultValue

Gets the default value for the CLR type corresponding to the database type of this column.

ClrType

Gets the CLR type corresponding to the database type of this column.

DefaultValue

Gets or sets a constant value to use as the default value for this column.

DefaultValue

Gets or sets a constant value to use as the default value for this property model.

Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources (such as the end user of an application). If input is accepted from such sources it should be validated before being passed to these APIs to protect against SQL injection attacks etc.

(Inherited from PropertyModel)
DefaultValueSql

Gets or sets a SQL expression used as the default value for this column.

DefaultValueSql

Gets or sets a SQL expression used as the default value for this property model.

Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources (such as the end user of an application). If input is accepted from such sources it should be validated before being passed to these APIs to protect against SQL injection attacks etc.

(Inherited from PropertyModel)
IsFixedLength

Gets or sets a value indicating if this column is fixed length. Only valid for array data types.

IsFixedLength

Gets or sets a value indicating if this property model is fixed length. Only valid for array data types.

(Inherited from PropertyModel)
IsIdentity

Gets or sets a value indicating if values for this column will be generated by the database using the identity pattern.

IsNullable

Gets or sets a value indicating if this column can store null values.

IsTimestamp

Gets or sets a value indicating if this property model should be configured as a timestamp.

IsUnicode

Gets or sets a value indicating if this column supports Unicode characters. Only valid for textual data types.

IsUnicode

Gets or sets a value indicating if this property model supports Unicode characters. Only valid for textual data types.

(Inherited from PropertyModel)
MaxLength

Gets or sets the maximum length for this column. Only valid for array data types.

MaxLength

Gets or sets the maximum length for this property model. Only valid for array data types.

(Inherited from PropertyModel)
Name

Gets or sets the name of the column.

Name

Gets or sets the name of the property model.

Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources (such as the end user of an application). If input is accepted from such sources it should be validated before being passed to these APIs to protect against SQL injection attacks etc.

(Inherited from PropertyModel)
Precision

Gets or sets the precision for this column. Only valid for decimal data types.

Precision

Gets or sets the precision for this property model. Only valid for decimal data types.

(Inherited from PropertyModel)
Scale

Gets or sets the scale for this column. Only valid for decimal data types.

Scale

Gets or sets the scale for this property model. Only valid for decimal data types.

(Inherited from PropertyModel)
StoreType

Gets or sets a provider specific data type to use for this column.

StoreType

Gets or sets a provider specific data type to use for this property model.

Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources (such as the end user of an application). If input is accepted from such sources it should be validated before being passed to these APIs to protect against SQL injection attacks etc.

(Inherited from PropertyModel)
Type

Gets the data type for this column.

Type

Gets the data type for this property model.

(Inherited from PropertyModel)
TypeUsage

Gets additional details about the data type of this column. This includes details such as maximum length, nullability etc.

TypeUsage

Gets additional details about the data type of this property model. This includes details such as maximum length, nullability etc.

(Inherited from PropertyModel)

Methods

IsNarrowerThan(ColumnModel, DbProviderManifest)

Determines if this column is a narrower data type than another column. Used to determine if altering the supplied column definition to this definition will result in data loss.

IsNarrowerThan(ColumnModel, DbProviderManifest)

Determines if this column is a narrower data type than another column. Used to determine if altering the supplied column definition to this definition will result in data loss.

Applies to