Class SqlParameterList
Represents the SqlParameter collection.
Inheritance
Implements
Inherited Members
Namespace: Mediachase.BusinessFoundation.Data.Sql
Assembly: Mediachase.BusinessFoundation.Data.dll
Version: 12.17.2Syntax
public class SqlParameterList : CollectionBase, IList, ICollection, IEnumerable
Constructors
SqlParameterList()
Initializes a new instance of the SqlParameterList class.
Declaration
public SqlParameterList()
Properties
Item[Int32]
Gets or sets the element at the specified index.
Declaration
public virtual SqlParameter this[int index] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index |
Property Value
Type | Description |
---|---|
System.Data.SqlClient.SqlParameter |
Item[String]
Gets the System.Data.SqlClient.SqlParameter with the specified param name.
Declaration
public SqlParameter this[string paramName] { get; }
Parameters
Type | Name | Description |
---|---|---|
System.String | paramName |
Property Value
Type | Description |
---|---|
System.Data.SqlClient.SqlParameter |
Methods
Add(SqlParameter)
Adds an SqlParameter to the SqlParameterList.
Declaration
public virtual int Add(SqlParameter param)
Parameters
Type | Name | Description |
---|---|---|
System.Data.SqlClient.SqlParameter | param | The SqlParameter to be added to the SqlParameterList |
Returns
Type | Description |
---|---|
System.Int32 | The index at which the value has been added. |
Add(SqlDbType, Object)
Adds the specified db type named @AutoParam#.
Declaration
public virtual SqlParameter Add(SqlDbType dbType, object value)
Parameters
Type | Name | Description |
---|---|---|
System.Data.SqlDbType | dbType | Type of the db. |
System.Object | value | The value. |
Returns
Type | Description |
---|---|
System.Data.SqlClient.SqlParameter |
Add(String, SqlDbType)
Creates a new SqlParameter by parameterName and SqlDbType and adds an SqlParameter to the SqlParameterList.
Declaration
public virtual SqlParameter Add(string parameterName, SqlDbType dbType)
Parameters
Type | Name | Description |
---|---|---|
System.String | parameterName | The name of the parameter to map. |
System.Data.SqlDbType | dbType | One of the System.Data.SqlDbType values. |
Returns
Type | Description |
---|---|
System.Data.SqlClient.SqlParameter | A new SqlParameter object. |
Add(String, SqlDbType, Int32, Object)
Creates a new SqlParameter by parameterName, SqlDbType, value and adds an SqlParameter to the SqlParameterList.
Declaration
public virtual SqlParameter Add(string parameterName, SqlDbType dbType, int size, object value)
Parameters
Type | Name | Description |
---|---|---|
System.String | parameterName | The name of the parameter to map. |
System.Data.SqlDbType | dbType | One of the System.Data.SqlDbType values. |
System.Int32 | size | The length of the parameter. |
System.Object | value | An Object that is the value of the SqlParameter. |
Returns
Type | Description |
---|---|
System.Data.SqlClient.SqlParameter | A new SqlParameter object. |
Add(String, SqlDbType, Object)
Creates a new SqlParameter by parameterName, SqlDbType, value and adds an SqlParameter to the SqlParameterList.
Declaration
public virtual SqlParameter Add(string parameterName, SqlDbType dbType, object value)
Parameters
Type | Name | Description |
---|---|---|
System.String | parameterName | The name of the parameter to map. |
System.Data.SqlDbType | dbType | One of the System.Data.SqlDbType values. |
System.Object | value | An Object that is the value of the SqlParameter. |
Returns
Type | Description |
---|---|
System.Data.SqlClient.SqlParameter | A new SqlParameter object. |
Add(String, Object)
Creates a new SqlParameter by parameterName and value and adds an SqlParameter to the SqlParameterList.
Declaration
public virtual SqlParameter Add(string parameterName, object value)
Parameters
Type | Name | Description |
---|---|---|
System.String | parameterName | The name of the parameter to map. |
System.Object | value | An Object that is the value of the SqlParameter. |
Returns
Type | Description |
---|---|
System.Data.SqlClient.SqlParameter | A new SqlParameter object. |
Contains(String)
Determines whether [contains] [the specified param name].
Declaration
public bool Contains(string paramName)
Parameters
Type | Name | Description |
---|---|---|
System.String | paramName | Name of the param. |
Returns
Type | Description |
---|---|
System.Boolean |
|
IndexOf(String)
Indexes the of.
Declaration
public int IndexOf(string paramName)
Parameters
Type | Name | Description |
---|---|---|
System.String | paramName | Name of the param. |
Returns
Type | Description |
---|---|
System.Int32 |
Remove(SqlParameter)
Removes the first occurrence of a specific object from the SqlParameterList.
Declaration
public virtual void Remove(SqlParameter param)
Parameters
Type | Name | Description |
---|---|---|
System.Data.SqlClient.SqlParameter | param | The SqlParameter to remove. |
ToArray()
Copies the elements of the SqlParameterList to a new array.
Declaration
public SqlParameter[] ToArray()
Returns
Type | Description |
---|---|
System.Data.SqlClient.SqlParameter[] | An SqlParameter array containing copies of the elements of the SqlParameterList. |
ToArray(SqlParameter[])
Copies the elements of the SqlParameterList to a new array and adds an additional params.
Declaration
public virtual SqlParameter[] ToArray(params SqlParameter[] addParams)
Parameters
Type | Name | Description |
---|---|---|
System.Data.SqlClient.SqlParameter[] | addParams | An additioanl SqlParameter items or null (Nothing in Visual Basic). |
Returns
Type | Description |
---|---|
System.Data.SqlClient.SqlParameter[] | An SqlParameter array containing copies of the elements of the SqlParameterList. |