Class DbConnectionExtensions
Extension methods for IDbConnection and DbConnection.
public static class DbConnectionExtensions
- Inheritance
-
DbConnectionExtensions
- Inherited Members
Methods
CreateCommand(DbConnection, SqlSyntaxOptions, SqlBuilderInterpolator)
Creates a command using an interpolated SQL builder with custom syntax options.
public static DbCommand CreateCommand(this DbConnection dbConnection, SqlSyntaxOptions syntaxOptions, SqlBuilderInterpolator interpolator)
Parameters
dbConnectionDbConnectionThe connection used to create the command.
syntaxOptionsSqlSyntaxOptionsSyntax options controlling parameter prefixes.
interpolatorSqlBuilderInterpolatorInterpolator that builds the SQL and parameters.
Returns
- DbCommand
A command initialized with text and parameters provided by
interpolator.
CreateCommand(DbConnection, SqlBuilderInterpolator)
Creates a command using an interpolated SQL builder.
public static DbCommand CreateCommand(this DbConnection dbConnection, SqlBuilderInterpolator interpolator)
Parameters
dbConnectionDbConnectionThe connection used to create the command.
interpolatorSqlBuilderInterpolatorInterpolator that builds the SQL and parameters.
Returns
- DbCommand
A command initialized with text and parameters provided by
interpolator.
CreateCommand(IDbConnection, SqlSyntaxOptions, SqlBuilderInterpolator)
Creates a command using an interpolated SQL builder with custom syntax options.
public static IDbCommand CreateCommand(this IDbConnection dbConnection, SqlSyntaxOptions syntaxOptions, SqlBuilderInterpolator interpolator)
Parameters
dbConnectionIDbConnectionThe connection used to create the command.
syntaxOptionsSqlSyntaxOptionsSyntax options controlling parameter prefixes.
interpolatorSqlBuilderInterpolatorInterpolator that builds the SQL and parameters.
Returns
- IDbCommand
A command initialized with text and parameters provided by
interpolator.
CreateCommand(IDbConnection, SqlBuilderInterpolator)
Creates a command using an interpolated SQL builder.
public static IDbCommand CreateCommand(this IDbConnection dbConnection, SqlBuilderInterpolator interpolator)
Parameters
dbConnectionIDbConnectionThe connection used to create the command.
interpolatorSqlBuilderInterpolatorInterpolator that builds the SQL and parameters.
Returns
- IDbCommand
A command initialized with text and parameters provided by
interpolator.