EntityParameterCollection 类

定义

表示一个与 EntityCommand 关联的参数集合。Represents a collection of parameters associated with a EntityCommand.

public ref class EntityParameterCollection sealed : System::Data::Common::DbParameterCollection
public sealed class EntityParameterCollection : System.Data.Common.DbParameterCollection
type EntityParameterCollection = class
    inherit DbParameterCollection
Public NotInheritable Class EntityParameterCollection
Inherits DbParameterCollection
继承
EntityParameterCollection

属性

Count

获取一个包含 EntityParameterCollection 中的元素数的整数。Gets an Integer that contains the number of elements in the EntityParameterCollection.

IsFixedSize

获取一个值,该值指示 EntityParameterCollection 是否具有固定大小。Gets a value that indicates whether the EntityParameterCollection has a fixed size.

IsReadOnly

获取一个值,该值指示 EntityParameterCollection 是否为只读。Gets a value that indicates whether the EntityParameterCollection is read-only.

IsSynchronized

获取一个值,该值指示 EntityParameterCollection 是否已同步。Gets a value that indicates whether the EntityParameterCollection is synchronized.

Item[Int32]

获取位于指定索引处的 EntityParameterGets the EntityParameter at the specified index.

Item[String]

获取具有指定名称的 EntityParameterGets the EntityParameter with the specified name.

SyncRoot

获取可用于同步对 EntityParameterCollection 的访问的对象。Gets an object that can be used to synchronize access to the EntityParameterCollection.

方法

Add(EntityParameter)

将指定的 EntityParameter 对象添加到 EntityParameterCollection 中。Adds the specified EntityParameter object to the EntityParameterCollection.

Add(Object)

将指定的对象添加到 EntityParameterCollection 中。Adds the specified object to the EntityParameterCollection.

Add(String, DbType)

在给定参数名称和数据类型时向 EntityParameter 中添加一个 EntityParameterCollectionAdds a EntityParameter to the EntityParameterCollection given the parameter name and the data type.

Add(String, DbType, Int32)

使用给定的参数名称、数据类型和列长度向 EntityParameter 中添加一个 EntityParameterCollectionAdds a EntityParameter to the EntityParameterCollection with the parameter name, the data type, and the column length.

AddRange(Array)

EntityParameterCollection 的末尾添加一个值数组。Adds an array of values to the end of the EntityParameterCollection.

AddRange(EntityParameter[])

EntityParameter 的末尾添加一个 EntityParameterCollection 值数组。Adds an array of EntityParameter values to the end of the EntityParameterCollection.

AddWithValue(String, Object)

EntityParameterCollection 的末尾添加一个值。Adds a value to the end of the EntityParameterCollection.

Clear()

EntityParameter 中移除所有的 EntityParameterCollection 对象。Removes all the EntityParameter objects from the EntityParameterCollection.

Contains(Object)

确定指定的 Object 是否在此 EntityParameterCollection 中。Determines whether the specified Object is in this EntityParameterCollection.

Contains(String)

确定指定的 EntityParameter 是否在此 EntityParameterCollection 中。Determines whether the specified EntityParameter is in this EntityParameterCollection.

CopyTo(Array, Int32)

将当前 EntityParameterCollection 的所有元素复制到指定的一维 Array 中,并以指定的目标 Array 索引位置作为复制到的起始位置。Copies all the elements of the current EntityParameterCollection to the specified one-dimensional Array starting at the specified destination Array index.

CopyTo(EntityParameter[], Int32)

将当前 EntityParameterCollection 的所有元素复制到指定的 EntityParameterCollection 中,并以指定的目标索引位置作为复制到的起始位置。Copies all the elements of the current EntityParameterCollection to the specified EntityParameterCollection starting at the specified destination index.

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)
GetEnumerator()

返回循环访问 EntityParameterCollection 的枚举数。Returns an enumerator that iterates through the EntityParameterCollection.

GetHashCode()

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

(继承自 Object)
GetLifetimeService()

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

(继承自 MarshalByRefObject)
GetParameter(Int32)

返回位于集合中指定索引处的 DbParameter 对象。Returns the DbParameter object at the specified index in the collection.

(继承自 DbParameterCollection)
GetParameter(String)

返回具有指定名称的 DbParameter 对象。Returns DbParameter the object with the specified name.

(继承自 DbParameterCollection)
GetType()

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

(继承自 Object)
IndexOf(EntityParameter)

获取指定的 EntityParameter 在集合中的位置。Gets the location of the specified EntityParameter in the collection.

IndexOf(Object)

获取指定的 Object 在集合中的位置。Gets the location of the specified Object in the collection.

IndexOf(String)

获取具有指定名称的指定 EntityParameter 的位置。Gets the location of the specified EntityParameter with the specified name.

InitializeLifetimeService()

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

(继承自 MarshalByRefObject)
Insert(Int32, EntityParameter)

EntityParameter 中的指定索引处插入一个 EntityParameterCollection 对象。Inserts a EntityParameter object into the EntityParameterCollection at the specified index.

Insert(Int32, Object)

Object 中的指定索引处插入一个 EntityParameterCollectionInserts an Object into the EntityParameterCollection at the specified index.

MemberwiseClone()

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

(继承自 Object)
MemberwiseClone(Boolean)

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

(继承自 MarshalByRefObject)
Remove(EntityParameter)

从集合中移除指定的 EntityParameterRemoves the specified EntityParameter from the collection.

Remove(Object)

从集合中移除指定的参数。Removes the specified parameter from the collection.

RemoveAt(Int32)

EntityParameter 的指定索引处移除 EntityParameterCollectionRemoves the EntityParameter from the EntityParameterCollection at the specified index.

RemoveAt(String)

EntityParameter 中移除具有指定参数名称的 EntityParameterCollectionRemoves the EntityParameter from the EntityParameterCollection at the specified parameter name.

SetParameter(Int32, DbParameter)

将指定索引处的 DbParameter 对象设置为新值。Sets the DbParameter object at the specified index to a new value.

(继承自 DbParameterCollection)
SetParameter(String, DbParameter)

将具有指定名称的 DbParameter 对象设置为新值。Sets the DbParameter object with the specified name to a new value.

(继承自 DbParameterCollection)
ToString()

返回表示当前对象的字符串。Returns a string that represents the current object.

(继承自 Object)

显式接口实现

ICollection.IsSynchronized

获取一个值,该值指示是否同步对 ICollection 的访问(线程安全)。Gets a value indicating whether access to the ICollection is synchronized (thread safe).

(继承自 DbParameterCollection)
IDataParameterCollection.Item[String]

获取或设置指定索引处的参数。Gets or sets the parameter at the specified index.

(继承自 DbParameterCollection)
IList.Add(Object)

有关此成员的说明,请参见 Add(Object)For a description of this member, see Add(Object).

(继承自 DbParameterCollection)
IList.Contains(Object)

有关此成员的说明,请参见 Contains(Object)For a description of this member, see Contains(Object).

(继承自 DbParameterCollection)
IList.IndexOf(Object)

有关此成员的说明,请参见 IndexOf(Object)For a description of this member, see IndexOf(Object).

(继承自 DbParameterCollection)
IList.Insert(Int32, Object)

有关此成员的说明,请参见 Insert(Int32, Object)For a description of this member, see Insert(Int32, Object).

(继承自 DbParameterCollection)
IList.IsFixedSize

获取一个值,该值指示 IList 是否具有固定大小。Gets a value indicating whether the IList has a fixed size.

(继承自 DbParameterCollection)
IList.IsReadOnly

获取一个值,该值指示 IList 是否为只读。Gets a value indicating whether the IList is read-only.

(继承自 DbParameterCollection)
IList.Item[Int32]

获取或设置指定索引处的元素。Gets or sets the element at the specified index.

(继承自 DbParameterCollection)
IList.Remove(Object)

有关此成员的说明,请参见 Remove(Object)For a description of this member, see Remove(Object).

(继承自 DbParameterCollection)

扩展方法

Cast<TResult>(IEnumerable)

IEnumerable 的元素强制转换为指定的类型。Casts the elements of an IEnumerable to the specified type.

OfType<TResult>(IEnumerable)

根据指定类型筛选 IEnumerable 的元素。Filters the elements of an IEnumerable based on a specified type.

AsParallel(IEnumerable)

启用查询的并行化。Enables parallelization of a query.

AsQueryable(IEnumerable)

IEnumerable 转换为 IQueryableConverts an IEnumerable to an IQueryable.

适用于