Class SqlParameterFactory
Class which created and sets up DbParameters for ADO use.
Inheritance
System.Object
SqlParameterFactory
Namespace: JK.Common.Data.Sql
Assembly: JK.Common.Data.Sql.dll
Syntax
public class SqlParameterFactory : ParameterFactoryBase<SqlDbType>
Constructors
| Improve this Doc View SourceSqlParameterFactory(IDbCommand)
Initializes a new instance of the SqlParameterFactory class.
Declaration
public SqlParameterFactory(IDbCommand commandToUse)
Parameters
Type | Name | Description |
---|---|---|
IDbCommand | commandToUse | The ADO DB Command. |
Methods
| Improve this Doc View SourceDefineStrategies()
Declaration
protected override void DefineStrategies()
Make(String, SqlDbType, ParameterDirection)
Uses the ADO DbProviderFactory to create a DbParameter of the correct type.
Declaration
public override IDbDataParameter Make(string name, SqlDbType databaseType, ParameterDirection direction = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Name of parameter. |
SqlDbType | databaseType | Database type of parameter. |
ParameterDirection | direction |
Returns
Type | Description |
---|---|
IDbDataParameter | DbParameter object for the provider. |