C# Class Dibware.StoredProcedureFramework.Helpers.SqlScalarFunctionDbCommandCreator

Responsible for creating Scalar function commands
Inheritance: Dibware.StoredProcedureFramework.Helpers.Base.SqlFunctionDbCommandCreatorBase
显示文件 Open project: dibley1973/StoredProcedureFramework Class Usage Examples

Public Methods

Method Description
BuildCommand ( ) : SqlScalarFunctionDbCommandCreator

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

CreateSqlScalarFunctionDbCommandCreator ( IDbConnection connection, string functionName ) : SqlScalarFunctionDbCommandCreator

Creates the sql function database command creator.

WithCommandTimeout ( int commandTimeout ) : SqlScalarFunctionDbCommandCreator

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

WithParameters ( IEnumerable parameters ) : SqlScalarFunctionDbCommandCreator

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

WithTransaction ( SqlTransaction transaction ) : SqlScalarFunctionDbCommandCreator

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

Private Methods

Method Description
SqlScalarFunctionDbCommandCreator ( IDbConnection connection ) : System
WithCommandText ( string commandText ) : SqlScalarFunctionDbCommandCreator
WithCommandType ( CommandType commandType ) : SqlScalarFunctionDbCommandCreator

Method Details

BuildCommand() public method

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 ( ) : SqlScalarFunctionDbCommandCreator
return SqlScalarFunctionDbCommandCreator

CreateSqlScalarFunctionDbCommandCreator() public static method

Creates the sql function database command creator.
/// connection /// or /// functionName ///
public static CreateSqlScalarFunctionDbCommandCreator ( IDbConnection connection, string functionName ) : SqlScalarFunctionDbCommandCreator
connection IDbConnection /// The connection to be passed to the command when it is constructed. ///
functionName string /// The name of the sql function for which the commmand is to call. ///
return SqlScalarFunctionDbCommandCreator

WithCommandTimeout() public method

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

WithParameters() public method

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

WithTransaction() public method

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