C# Class Dibware.StoredProcedureFramework.Helpers.Base.DbCommandCreatorBase

Inheritance: IDbCommandCreator
Show file Open project: dibley1973/StoredProcedureFramework

Public Methods

Method Description
BuildCommand ( ) : IDbCommandCreator

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

WithCommandTimeout ( int commandTimeout ) : void
WithParameters ( IEnumerable parameters ) : void
WithTransaction ( SqlTransaction transaction ) : void

Protected Methods

Method Description
DbCommandCreatorBase ( IDbConnection connection ) : System

Initializes a new instance of the DbCommandCreatorBase class.

SetCommandTextForCommand ( ) : void
SetCommandTimeoutIfExistsForCommand ( ) : void
SetCommandTypeForCommand ( ) : void
SetTransactionIfExistsForCommand ( ) : void
WithCommandText ( string commandText ) : void
WithCommandType ( CommandType commandType ) : void

Private Methods

Method Description
AddParametersToCommand ( ) : void
ClearAnyExistingParameters ( ) : void
CreateCommand ( ) : void
LoadCommandParametersIfAnyExist ( ) : void

Method Details

BuildCommand() public method

Builds and sets up the command based upon the settings that have been previously passed to this builder.
public BuildCommand ( ) : IDbCommandCreator
return IDbCommandCreator

DbCommandCreatorBase() protected method

Initializes a new instance of the DbCommandCreatorBase class.
connection
protected DbCommandCreatorBase ( IDbConnection connection ) : System
connection IDbConnection /// The DbConnection to run the command against. ///
return System

SetCommandTextForCommand() protected method

protected SetCommandTextForCommand ( ) : void
return void

SetCommandTimeoutIfExistsForCommand() protected method

protected SetCommandTimeoutIfExistsForCommand ( ) : void
return void

SetCommandTypeForCommand() protected method

protected SetCommandTypeForCommand ( ) : void
return void

SetTransactionIfExistsForCommand() protected method

protected SetTransactionIfExistsForCommand ( ) : void
return void

WithCommandText() protected method

protected WithCommandText ( string commandText ) : void
commandText string
return void

WithCommandTimeout() public method

public WithCommandTimeout ( int commandTimeout ) : void
commandTimeout int
return void

WithCommandType() protected method

protected WithCommandType ( CommandType commandType ) : void
commandType CommandType
return void

WithParameters() public method

public WithParameters ( IEnumerable parameters ) : void
parameters IEnumerable
return void

WithTransaction() public method

public WithTransaction ( SqlTransaction transaction ) : void
transaction System.Data.SqlClient.SqlTransaction
return void