Table of Contents

Class SqlCommandFactoryExtensions

Namespace
Utils.Data
Assembly
Utils.Data.dll

Provides extension methods to build commands through SqlCommandFactory instances.

public static class SqlCommandFactoryExtensions
Inheritance
SqlCommandFactoryExtensions
Inherited Members

Methods

CreateCommand(SqlCommandFactory, DbConnection, CommandInterpolator)

Creates a command using the configured syntax options and the provided interpolated SQL builder.

public static DbCommand CreateCommand(this SqlCommandFactory factory, DbConnection dbConnection, SqlCommandFactory.CommandInterpolator interpolator)

Parameters

factory SqlCommandFactory

Factory supplying syntax options for the interpolator.

dbConnection DbConnection

The connection used to create the command.

interpolator SqlCommandFactory.CommandInterpolator

Interpolator that builds the SQL and parameters.

Returns

DbCommand

A command initialized with text and parameters provided by interpolator.

Exceptions

ArgumentNullException

Thrown when factory or dbConnection is null.

CreateCommand(SqlCommandFactory, IDbConnection, CommandInterpolator)

Creates a command using the configured syntax options and the provided interpolated SQL builder.

public static IDbCommand CreateCommand(this SqlCommandFactory factory, IDbConnection dbConnection, SqlCommandFactory.CommandInterpolator interpolator)

Parameters

factory SqlCommandFactory

Factory supplying syntax options for the interpolator.

dbConnection IDbConnection

The connection used to create the command.

interpolator SqlCommandFactory.CommandInterpolator

Interpolator that builds the SQL and parameters.

Returns

IDbCommand

A command initialized with text and parameters provided by interpolator.

Exceptions

ArgumentNullException

Thrown when factory or dbConnection is null.