EntityParameter 类

定义

表示在 EntityCommand 中使用的参数。Represents a parameter used in EntityCommand.

public ref class EntityParameter sealed : System::Data::Common::DbParameter
public sealed class EntityParameter : System.Data.Common.DbParameter
type EntityParameter = class
    inherit DbParameter
    interface IDbDataParameter
    interface IDataParameter
Public NotInheritable Class EntityParameter
Inherits DbParameter
继承
实现

构造函数

EntityParameter()

使用默认值初始化 EntityParameter 类的新实例。Initializes a new instance of the EntityParameter class using the default values.

EntityParameter(String, DbType)

使用指定的参数名称、数据类型初始化 EntityParameter 类的新实例。Initializes a new instance of the EntityParameter class using the specified parameter name and data type.

EntityParameter(String, DbType, Int32)

使用指定的参数名称、数据类型和大小初始化 EntityParameter 类的新实例。Initializes a new instance of the EntityParameter class using the specified parameter name, data type and size.

EntityParameter(String, DbType, Int32, ParameterDirection, Boolean, Byte, Byte, String, DataRowVersion, Object)

使用指定的属性实例初始化 EntityParameter 类的新实例。Initializes a new instance of the EntityParameter class using the specified properties.

EntityParameter(String, DbType, Int32, String)

使用指定的属性实例初始化 EntityParameter 类的新实例。Initializes a new instance of the EntityParameter class using the specified properties.

属性

DbType

获取或设置参数的 DbTypeGets or sets the DbType of the parameter.

Direction

获取或设置参数的方向。Gets or sets the direction of the parameter.

EdmType

获取或设置表示为为 EdmType 的参数类型。Gets or sets the type of the parameter, expressed as an EdmType.

IsNullable

获取或设置一个值,该值指示参数是否接受 null 值。Gets or sets a value that indicates whether the parameter accepts null values.

ParameterName

获取或设置实体参数的名称。Gets or sets the name of the entity parameter.

Precision

获取或设置用来表示 Value 属性的最大位数。Gets or sets the number of digits used to represent the Value property.

Scale

获取或设置所解析的 Value 的小数位数。Gets or sets the number of decimal places to which Value is resolved.

Size

获取或设置列内数据的最大大小。Gets or sets the maximum size of the data within the column.

SourceColumn

获取或设置源列的名称,该源列映射到 DataSet 并用于加载或返回 ValueGets or sets the name of the source column mapped to the DataSet and used for loading or returning the Value.

SourceColumnNullMapping

获取或设置一个值,该值指示源列是否可以为 null。Gets or sets a value that indicates whether source column is nullable.

SourceVersion

获取或设置在加载值时使用的 DataRowVersionGets or sets the DataRowVersion to use when loading the value.

Value

获取或设置参数的值。Gets or sets the value of the parameter.

方法

CreateObjRef(Type)

创建一个对象,该对象包含生成用于与远程对象进行通信的代理所需的全部相关信息。Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.

(继承自 MarshalByRefObject)
Equals(Object)

确定指定对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(继承自 Object)
GetHashCode()

作为默认哈希函数。Serves as the default hash function.

(继承自 Object)
GetLifetimeService()

检索控制此实例的生存期策略的当前生存期服务对象。Retrieves the current lifetime service object that controls the lifetime policy for this instance.

(继承自 MarshalByRefObject)
GetType()

获取当前实例的 TypeGets the Type of the current instance.

(继承自 Object)
InitializeLifetimeService()

获取生存期服务对象来控制此实例的生存期策略。Obtains a lifetime service object to control the lifetime policy for this instance.

(继承自 MarshalByRefObject)
MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(继承自 Object)
MemberwiseClone(Boolean)

创建当前 MarshalByRefObject 对象的浅表副本。Creates a shallow copy of the current MarshalByRefObject object.

(继承自 MarshalByRefObject)
ResetDbType()

重置与此 EntityParameter 关联的类型。Resets the type associated with the EntityParameter.

ToString()

返回参数的字符串表示形式。Returns a string representation of the parameter.

显式接口实现

IDataParameter.SourceVersion

获取或设置要在加载 Value 时使用的 DataRowVersionGets or sets the DataRowVersion to use when loading Value.

(继承自 DbParameter)
IDbDataParameter.Precision

指示数值参数的精度。Indicates the precision of numeric parameters.

(继承自 DbParameter)
IDbDataParameter.Scale

有关此成员的说明,请参见 ScaleFor a description of this member, see Scale.

(继承自 DbParameter)

适用于