Share via


ColumnBuilder.Decimal Method

Definition

Overloads

Decimal(Nullable<Boolean>, Nullable<Byte>, Nullable<Byte>, Nullable<Decimal>, String, String, String, Boolean)

Creates a new column definition to store Decimal data.

Decimal(Nullable<Boolean>, Nullable<Byte>, Nullable<Byte>, Nullable<Decimal>, String, String, String, Boolean, IDictionary<String,AnnotationValues>)

Creates a new column definition to store Decimal data.

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.

Decimal(Nullable<Boolean>, Nullable<Byte>, Nullable<Byte>, Nullable<Decimal>, String, String, String, Boolean)

Creates a new column definition to store Decimal data.

public System.Data.Entity.Migrations.Model.ColumnModel Decimal (Nullable<bool> nullable = null, Nullable<byte> precision = null, Nullable<byte> scale = null, Nullable<decimal> defaultValue = null, string defaultValueSql = null, string name = null, string storeType = null, bool identity = false);
member this.Decimal : Nullable<bool> * Nullable<byte> * Nullable<byte> * Nullable<decimal> * string * string * string * bool -> System.Data.Entity.Migrations.Model.ColumnModel
Public Function Decimal (Optional nullable As Nullable(Of Boolean) = null, Optional precision As Nullable(Of Byte) = null, Optional scale As Nullable(Of Byte) = null, Optional defaultValue As Nullable(Of Decimal) = null, Optional defaultValueSql As String = null, Optional name As String = null, Optional storeType As String = null, Optional identity As Boolean = false) As ColumnModel

Parameters

nullable
Nullable<Boolean>

Value indicating whether or not the column allows null values.

precision
Nullable<Byte>

The numeric precision of the column.

scale
Nullable<Byte>

The numeric scale of the column.

defaultValue
Nullable<Decimal>

Constant value to use as the default value for this column.

defaultValueSql
String

SQL expression used as the default value for this column.

name
String

The name of the column.

storeType
String

Provider specific data type to use for this column.

identity
Boolean

Value indicating whether or not the database will generate values for this column during insert.

Returns

The newly constructed column definition.

Applies to

Decimal(Nullable<Boolean>, Nullable<Byte>, Nullable<Byte>, Nullable<Decimal>, String, String, String, Boolean, IDictionary<String,AnnotationValues>)

Creates a new column definition to store Decimal data.

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.

[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1026:DefaultParametersShouldNotBeUsed")]
public System.Data.Entity.Migrations.Model.ColumnModel Decimal (Nullable<bool> nullable = null, Nullable<byte> precision = null, Nullable<byte> scale = null, Nullable<decimal> defaultValue = null, string defaultValueSql = null, string name = null, string storeType = null, bool identity = false, System.Collections.Generic.IDictionary<string,System.Data.Entity.Infrastructure.Annotations.AnnotationValues> annotations = null);
member this.Decimal : Nullable<bool> * Nullable<byte> * Nullable<byte> * Nullable<decimal> * string * string * string * bool * System.Collections.Generic.IDictionary<string, System.Data.Entity.Infrastructure.Annotations.AnnotationValues> -> System.Data.Entity.Migrations.Model.ColumnModel
Public Function Decimal (Optional nullable As Nullable(Of Boolean) = null, Optional precision As Nullable(Of Byte) = null, Optional scale As Nullable(Of Byte) = null, Optional defaultValue As Nullable(Of Decimal) = null, Optional defaultValueSql As String = null, Optional name As String = null, Optional storeType As String = null, Optional identity As Boolean = false, Optional annotations As IDictionary(Of String, AnnotationValues) = null) As ColumnModel

Parameters

nullable
Nullable<Boolean>

Value indicating whether or not the column allows null values.

precision
Nullable<Byte>

The numeric precision of the column.

scale
Nullable<Byte>

The numeric scale of the column.

defaultValue
Nullable<Decimal>

Constant value to use as the default value for this column.

defaultValueSql
String

SQL expression used as the default value for this column.

name
String

The name of the column.

storeType
String

Provider specific data type to use for this column.

identity
Boolean

Value indicating whether or not the database will generate values for this column during insert.

annotations
IDictionary<String,AnnotationValues>

Custom annotations usually from the Code First model.

Returns

The newly constructed column definition.

Attributes

Applies to