Class SqlCommandFactoryExtensions
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
factorySqlCommandFactoryFactory supplying syntax options for the interpolator.
dbConnectionDbConnectionThe connection used to create the command.
interpolatorSqlCommandFactory.CommandInterpolatorInterpolator that builds the SQL and parameters.
Returns
- DbCommand
A command initialized with text and parameters provided by
interpolator.
Exceptions
- ArgumentNullException
Thrown when
factoryordbConnectionis 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
factorySqlCommandFactoryFactory supplying syntax options for the interpolator.
dbConnectionIDbConnectionThe connection used to create the command.
interpolatorSqlCommandFactory.CommandInterpolatorInterpolator that builds the SQL and parameters.
Returns
- IDbCommand
A command initialized with text and parameters provided by
interpolator.
Exceptions
- ArgumentNullException
Thrown when
factoryordbConnectionis null.