ColumnBuilder.Long Method (Nullable<Boolean>, Boolean, Nullable<Int64>, String, String, String, IDictionary<String, AnnotationValues>)
Creates a new column definition to store Long 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.
Assembly: EntityFramework (in EntityFramework.dll)
[SuppressMessageAttribute("Microsoft.Design", "CA1026:DefaultParametersShouldNotBeUsed")] [SuppressMessageAttribute("Microsoft.Performance", "CA1822:MarkMembersAsStatic")] public ColumnModel Long( Nullable<bool> nullable = null, bool identity = false, Nullable<long> defaultValue = null, string defaultValueSql = null, string name = null, string storeType = null, IDictionary<string, AnnotationValues> annotations = null )
Parameters
- nullable
-
Type:
System.Nullable<Boolean>
Value indicating whether or not the column allows null values.
- identity
-
Type:
System.Boolean
Value indicating whether or not the database will generate values for this column during insert.
- defaultValue
-
Type:
System.Nullable<Int64>
Constant value to use as the default value for this column.
- defaultValueSql
-
Type:
System.String
SQL expression used as the default value for this column.
- name
-
Type:
System.String
The name of the column.
- storeType
-
Type:
System.String
Provider specific data type to use for this column.
- annotations
-
Type:
System.Collections.Generic.IDictionary<String, AnnotationValues>
Custom annotations usually from the Code First model.
Return Value
Type: System.Data.Entity.Migrations.Model.ColumnModelThe newly constructed column definition.