EntityParameterCollection.Add Method

 

Adds an object to the collection.

Namespace:   System.Data.Entity.Core.EntityClient
Assembly:  EntityFramework (in EntityFramework.dll)

NameDescription
System_CAPS_pubmethodAdd(EntityParameter)

Adds the specified EntityParameter object to the EntityParameterCollection .

System_CAPS_pubmethodAdd(Object)

Adds the specified object to the EntityParameterCollection.(Overrides DbParameterCollection.Add(Object).)

System_CAPS_pubmethodAdd(String, DbType)

Adds a EntityParameter to the EntityParameterCollection given the parameter name and the data type.

System_CAPS_pubmethodAdd(String, DbType, Int32)

Adds a EntityParameter to the EntityParameterCollection with the parameter name, the data type, and the column length.


EntityParameterCollection.Add Method (EntityParameter)

Adds the specified EntityParameter object to the EntityParameterCollection .

public EntityParameter Add(
	EntityParameter value
)

Parameters

value
Type: System.Data.Entity.Core.EntityClient.EntityParameter

The EntityParameter to add to the collection.

Exception Condition
ArgumentException

The EntityParameter specified in the value parameter is already added to this or another EntityParameterCollection .

InvalidCastException

The parameter passed was not a EntityParameter.

ArgumentNullException

The value parameter is null.


EntityParameterCollection.Add Method (Object)

Adds the specified object to the EntityParameterCollection.

[EditorBrowsableAttribute(EditorBrowsableState.Never)]
public override int Add(
	object value
)

Parameters

value
Type: System.Object

An Object.

Return Value

Type: System.Int32

The index of the new EntityParameter object.


EntityParameterCollection.Add Method (String, DbType)

Adds a EntityParameter to the EntityParameterCollection given the parameter name and the data type.

public EntityParameter Add(
	string parameterName,
	DbType dbType
)

Parameters

parameterName
Type: System.String

The name of the parameter.

dbType
Type: System.Data.DbType

One of the DbType values.


EntityParameterCollection.Add Method (String, DbType, Int32)

Adds a EntityParameter to the EntityParameterCollection with the parameter name, the data type, and the column length.

public EntityParameter Add(
	string parameterName,
	DbType dbType,
	int size
)

Parameters

parameterName
Type: System.String

The name of the parameter.

dbType
Type: System.Data.DbType

One of the DbType values.

size
Type: System.Int32

The column length.