EntityParameterCollection.Add Method
Adds an object to the collection.
Assembly: EntityFramework (in EntityFramework.dll)
Name | Description | |
---|---|---|
![]() | Add(EntityParameter) | Adds the specified EntityParameter object to the EntityParameterCollection . |
![]() | Add(Object) | Adds the specified object to the EntityParameterCollection.(Overrides DbParameterCollection.Add(Object).) |
![]() | Add(String, DbType) | Adds a EntityParameter to the EntityParameterCollection given the parameter name and the data type. |
![]() | Add(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 .
Parameters
- value
-
Type:
System.Data.Entity.Core.EntityClient.EntityParameter
The EntityParameter to add to the collection.
Return Value
Type: System.Data.Entity.Core.EntityClient.EntityParameterA new EntityParameter object.
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.
Implements
IList.Add(Object)EntityParameterCollection.Add Method (String, DbType)
Adds a EntityParameter to the EntityParameterCollection given the parameter name and the data type.
Parameters
- parameterName
-
Type:
System.String
The name of the parameter.
- dbType
-
Type:
System.Data.DbType
One of the DbType values.
Return Value
Type: System.Data.Entity.Core.EntityClient.EntityParameterA new EntityParameter object.
EntityParameterCollection.Add Method (String, DbType, Int32)
Adds a EntityParameter to the EntityParameterCollection with the parameter name, the data type, and the column length.
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.
Return Value
Type: System.Data.Entity.Core.EntityClient.EntityParameterA new EntityParameter object.