ColumnBuilder.Short 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
Short(Nullable<Boolean>, Boolean, Nullable<Int16>, String, String, String) |
创建用于存储 Short 数据的新列定义。 |
Short(Nullable<Boolean>, Boolean, Nullable<Int16>, String, String, String, IDictionary<String,AnnotationValues>) |
创建用于存储 Short 数据的新列定义。 实体框架迁移 API 并非旨在接受不受信任的源 ((例如应用程序) 的最终用户)提供的输入。 如果从此类源接受输入,则应先对其进行验证,然后再传递到这些 API,以防止 SQL 注入攻击等。 |
Short(Nullable<Boolean>, Boolean, Nullable<Int16>, String, String, String)
创建用于存储 Short 数据的新列定义。
public System.Data.Entity.Migrations.Model.ColumnModel Short (Nullable<bool> nullable = null, bool identity = false, Nullable<short> defaultValue = null, string defaultValueSql = null, string name = null, string storeType = null);
member this.Short : Nullable<bool> * bool * Nullable<int16> * string * string * string -> System.Data.Entity.Migrations.Model.ColumnModel
Public Function Short (Optional nullable As Nullable(Of Boolean) = null, Optional identity As Boolean = false, Optional defaultValue As Nullable(Of Short) = null, Optional defaultValueSql As String = null, Optional name As String = null, Optional storeType As String = null) As ColumnModel
参数
- identity
- Boolean
指示数据库是否在插入期间生成此列的值的值。
- defaultValueSql
- String
用作此列的默认值的 SQL 表达式。
- name
- String
列的名称。
- storeType
- String
要用于此列的提供程序特定数据类型。
返回
新构造的列定义。
适用于
Short(Nullable<Boolean>, Boolean, Nullable<Int16>, String, String, String, IDictionary<String,AnnotationValues>)
创建用于存储 Short 数据的新列定义。
实体框架迁移 API 并非旨在接受不受信任的源 ((例如应用程序) 的最终用户)提供的输入。 如果从此类源接受输入,则应先对其进行验证,然后再传递到这些 API,以防止 SQL 注入攻击等。
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1026:DefaultParametersShouldNotBeUsed")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic")]
public System.Data.Entity.Migrations.Model.ColumnModel Short (Nullable<bool> nullable = null, bool identity = false, Nullable<short> defaultValue = null, string defaultValueSql = null, string name = null, string storeType = null, System.Collections.Generic.IDictionary<string,System.Data.Entity.Infrastructure.Annotations.AnnotationValues> annotations = null);
member this.Short : Nullable<bool> * bool * Nullable<int16> * string * string * string * System.Collections.Generic.IDictionary<string, System.Data.Entity.Infrastructure.Annotations.AnnotationValues> -> System.Data.Entity.Migrations.Model.ColumnModel
Public Function Short (Optional nullable As Nullable(Of Boolean) = null, Optional identity As Boolean = false, Optional defaultValue As Nullable(Of Short) = null, Optional defaultValueSql As String = null, Optional name As String = null, Optional storeType As String = null, Optional annotations As IDictionary(Of String, AnnotationValues) = null) As ColumnModel
参数
- identity
- Boolean
指示数据库是否在插入期间生成此列的值的值。
- defaultValueSql
- String
用作此列的默认值的 SQL 表达式。
- name
- String
列的名称。
- storeType
- String
要用于此列的提供程序特定数据类型。
- annotations
- IDictionary<String,AnnotationValues>
自定义批注通常来自 Code First 模型。
返回
新构造的列定义。
- 属性