RelationalCommandBuilderExtensions.AddParameter 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
AddParameter(IRelationalCommandBuilder, String, String)
注意
Use overload which takes TypeMapping argument.
添加参数。
public static Microsoft.EntityFrameworkCore.Storage.IRelationalCommandBuilder AddParameter (this Microsoft.EntityFrameworkCore.Storage.IRelationalCommandBuilder commandBuilder, string invariantName, string name);
[System.Obsolete("Use overload which takes TypeMapping argument.")]
public static Microsoft.EntityFrameworkCore.Storage.IRelationalCommandBuilder AddParameter (this Microsoft.EntityFrameworkCore.Storage.IRelationalCommandBuilder commandBuilder, string invariantName, string name);
static member AddParameter : Microsoft.EntityFrameworkCore.Storage.IRelationalCommandBuilder * string * string -> Microsoft.EntityFrameworkCore.Storage.IRelationalCommandBuilder
[<System.Obsolete("Use overload which takes TypeMapping argument.")>]
static member AddParameter : Microsoft.EntityFrameworkCore.Storage.IRelationalCommandBuilder * string * string -> Microsoft.EntityFrameworkCore.Storage.IRelationalCommandBuilder
<Extension()>
Public Function AddParameter (commandBuilder As IRelationalCommandBuilder, invariantName As String, name As String) As IRelationalCommandBuilder
参数
- commandBuilder
- IRelationalCommandBuilder
命令生成器。
- invariantName
- String
标识此参数的键。 请注意, IRelationalParameter 仅表示参数的占位符,而不是实际值。 这是因为可以使用不同的参数值多次重复使用同一命令。
- name
- String
对数据库执行命令时要用于参数的名称。
返回
同一生成器实例,以便可以链接多个调用。
- 属性
适用于
AddParameter(IRelationalCommandBuilder, String, String, IProperty)
注意
Use overload with relationalTypeMapping
添加参数。
public static Microsoft.EntityFrameworkCore.Storage.IRelationalCommandBuilder AddParameter (this Microsoft.EntityFrameworkCore.Storage.IRelationalCommandBuilder commandBuilder, string invariantName, string name, Microsoft.EntityFrameworkCore.Metadata.IProperty property);
[System.Obsolete("Use overload with relationalTypeMapping")]
public static Microsoft.EntityFrameworkCore.Storage.IRelationalCommandBuilder AddParameter (this Microsoft.EntityFrameworkCore.Storage.IRelationalCommandBuilder commandBuilder, string invariantName, string name, Microsoft.EntityFrameworkCore.Metadata.IProperty property);
static member AddParameter : Microsoft.EntityFrameworkCore.Storage.IRelationalCommandBuilder * string * string * Microsoft.EntityFrameworkCore.Metadata.IProperty -> Microsoft.EntityFrameworkCore.Storage.IRelationalCommandBuilder
[<System.Obsolete("Use overload with relationalTypeMapping")>]
static member AddParameter : Microsoft.EntityFrameworkCore.Storage.IRelationalCommandBuilder * string * string * Microsoft.EntityFrameworkCore.Metadata.IProperty -> Microsoft.EntityFrameworkCore.Storage.IRelationalCommandBuilder
<Extension()>
Public Function AddParameter (commandBuilder As IRelationalCommandBuilder, invariantName As String, name As String, property As IProperty) As IRelationalCommandBuilder
参数
- commandBuilder
- IRelationalCommandBuilder
命令生成器。
- invariantName
- String
标识此参数的键。 请注意, IRelationalParameter 仅表示参数的占位符,而不是实际值。 这是因为可以使用不同的参数值多次重复使用同一命令。
- name
- String
对数据库执行命令时要用于参数的名称。
- property
- IProperty
此参数的类型将来自的属性。
返回
同一生成器实例,以便可以链接多个调用。
- 属性
适用于
AddParameter(IRelationalCommandBuilder, String, String, RelationalTypeMapping, Boolean)
添加参数。
public static Microsoft.EntityFrameworkCore.Storage.IRelationalCommandBuilder AddParameter (this Microsoft.EntityFrameworkCore.Storage.IRelationalCommandBuilder commandBuilder, string invariantName, string name, Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping typeMapping, bool nullable);
static member AddParameter : Microsoft.EntityFrameworkCore.Storage.IRelationalCommandBuilder * string * string * Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping * bool -> Microsoft.EntityFrameworkCore.Storage.IRelationalCommandBuilder
<Extension()>
Public Function AddParameter (commandBuilder As IRelationalCommandBuilder, invariantName As String, name As String, typeMapping As RelationalTypeMapping, nullable As Boolean) As IRelationalCommandBuilder
参数
- commandBuilder
- IRelationalCommandBuilder
命令生成器。
- invariantName
- String
标识此参数的键。 请注意, IRelationalParameter 仅表示参数的占位符,而不是实际值。 这是因为可以使用不同的参数值多次重复使用同一命令。
- name
- String
对数据库执行命令时要用于参数的名称。
- typeMapping
- RelationalTypeMapping
此参数的值将来自的属性的类型映射。
- nullable
- Boolean
一个 值,该值指示参数是否可以包含 null 值。
返回
同一生成器实例,以便可以链接多个调用。
适用于
AddParameter(IRelationalCommandBuilder, String, String, RelationalTypeMapping, Nullable<Boolean>)
添加参数。
public static Microsoft.EntityFrameworkCore.Storage.IRelationalCommandBuilder AddParameter (this Microsoft.EntityFrameworkCore.Storage.IRelationalCommandBuilder commandBuilder, string invariantName, string name, Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping relationalTypeMapping, bool? nullable);
static member AddParameter : Microsoft.EntityFrameworkCore.Storage.IRelationalCommandBuilder * string * string * Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping * Nullable<bool> -> Microsoft.EntityFrameworkCore.Storage.IRelationalCommandBuilder
<Extension()>
Public Function AddParameter (commandBuilder As IRelationalCommandBuilder, invariantName As String, name As String, relationalTypeMapping As RelationalTypeMapping, nullable As Nullable(Of Boolean)) As IRelationalCommandBuilder
参数
- commandBuilder
- IRelationalCommandBuilder
命令生成器。
- invariantName
- String
标识此参数的键。 请注意, IRelationalParameter 仅表示参数的占位符,而不是实际值。 这是因为可以使用不同的参数值多次重复使用同一命令。
- name
- String
对数据库执行命令时要用于参数的名称。
- relationalTypeMapping
- RelationalTypeMapping
此参数的关系类型映射。
返回
同一生成器实例,以便可以链接多个调用。
适用于
AddParameter(IRelationalCommandBuilder, String, String, RelationalTypeMapping, Nullable<Boolean>, ParameterDirection)
添加参数。
public static Microsoft.EntityFrameworkCore.Storage.IRelationalCommandBuilder AddParameter (this Microsoft.EntityFrameworkCore.Storage.IRelationalCommandBuilder commandBuilder, string invariantName, string name, Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping relationalTypeMapping, bool? nullable, System.Data.ParameterDirection direction = System.Data.ParameterDirection.Input);
static member AddParameter : Microsoft.EntityFrameworkCore.Storage.IRelationalCommandBuilder * string * string * Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping * Nullable<bool> * System.Data.ParameterDirection -> Microsoft.EntityFrameworkCore.Storage.IRelationalCommandBuilder
<Extension()>
Public Function AddParameter (commandBuilder As IRelationalCommandBuilder, invariantName As String, name As String, relationalTypeMapping As RelationalTypeMapping, nullable As Nullable(Of Boolean), Optional direction As ParameterDirection = System.Data.ParameterDirection.Input) As IRelationalCommandBuilder
参数
- commandBuilder
- IRelationalCommandBuilder
命令生成器。
- invariantName
- String
标识此参数的键。 请注意, IRelationalParameter 仅表示参数的占位符,而不是实际值。 这是因为可以使用不同的参数值多次重复使用同一命令。
- name
- String
对数据库执行命令时要用于参数的名称。
- relationalTypeMapping
- RelationalTypeMapping
此参数的关系类型映射。
- direction
- ParameterDirection
参数方向。
返回
同一生成器实例,以便可以链接多个调用。