C# Class Dibware.StoredProcedureFramework.Helpers.StoredProcedureDbCommandCreator

Responsible for creating stored procedure commands
Inheritance: Dibware.StoredProcedureFramework.Helpers.Base.DbCommandCreatorBase
Afficher le fichier Open project: dibley1973/StoredProcedureFramework Class Usage Examples

Méthodes publiques

Méthode Description
BuildCommand ( ) : StoredProcedureDbCommandCreator

Builds and sets up the command based upon the settings that have been previously passed to this builder.

Should call into base implementation before executing any addtional code

CreateStoredProcedureDbCommandCreator ( IDbConnection connection, string procedureName ) : StoredProcedureDbCommandCreator

Creates the stored procedure database command creator.

WithCommandTimeout ( int commandTimeout ) : StoredProcedureDbCommandCreator

Adds a command timeout to the builder which will be passed to the command when it is construted.

WithParameters ( IEnumerable parameters ) : StoredProcedureDbCommandCreator

Adds the specified parameters to the builder, and these will be added to the command when it is built.

WithTransaction ( SqlTransaction transaction ) : StoredProcedureDbCommandCreator

Adds the specified transaction to the builder, and these will be added to the command when it is built.

Private Methods

Méthode Description
StoredProcedureDbCommandCreator ( IDbConnection connection ) : System
WithCommandText ( string commandText ) : StoredProcedureDbCommandCreator
WithCommandType ( CommandType commandType ) : StoredProcedureDbCommandCreator

Method Details

BuildCommand() public méthode

Builds and sets up the command based upon the settings that have been previously passed to this builder.
Should call into base implementation before executing any addtional code
public BuildCommand ( ) : StoredProcedureDbCommandCreator
Résultat StoredProcedureDbCommandCreator

CreateStoredProcedureDbCommandCreator() public static méthode

Creates the stored procedure database command creator.
/// connection /// or /// procedureName ///
public static CreateStoredProcedureDbCommandCreator ( IDbConnection connection, string procedureName ) : StoredProcedureDbCommandCreator
connection IDbConnection /// The connection to be passed to the command when it is constructed. ///
procedureName string /// The name of the stored procedure for which the commmand is to call. ///
Résultat StoredProcedureDbCommandCreator

WithCommandTimeout() public méthode

Adds a command timeout to the builder which will be passed to the command when it is construted.
public WithCommandTimeout ( int commandTimeout ) : StoredProcedureDbCommandCreator
commandTimeout int The value of the command timeout.
Résultat StoredProcedureDbCommandCreator

WithParameters() public méthode

Adds the specified parameters to the builder, and these will be added to the command when it is built.
public WithParameters ( IEnumerable parameters ) : StoredProcedureDbCommandCreator
parameters IEnumerable The parameters to add to the command.
Résultat StoredProcedureDbCommandCreator

WithTransaction() public méthode

Adds the specified transaction to the builder, and these will be added to the command when it is built.
public WithTransaction ( SqlTransaction transaction ) : StoredProcedureDbCommandCreator
transaction System.Data.SqlClient.SqlTransaction The transaction to add to teh command.
Résultat StoredProcedureDbCommandCreator