Class QueryBuilderExtensions
- Namespace
- Rinku
- Assembly
- Rinku.dll
Runs a query off an in-memory QueryBuilder. Once the builder holds the values you want, these methods turn them into a command on a connection and execute it, in the same shapes the command's own execution methods offer.
public static class QueryBuilderExtensions
- Inheritance
-
QueryBuilderExtensions
- Inherited Members
Methods
GetCommand<T>(T, object?[], DbConnection, DbTransaction?, int?)
Builds a fresh command on cnn for the current builder values. Useful when you want
the command in hand rather than running it through one of the execution methods.
public static DbCommand GetCommand<T>(T command, object?[] variables, DbConnection cnn, DbTransaction? transaction = null, int? timeout = null) where T : IQueryCommand
Parameters
commandTThe command whose text and parameters are produced from the values.
variablesobject[]The builder values driving the command.
cnnDbConnectionThe connection to create the command on.
transactionDbTransactionThe transaction to enlist, if any.
timeoutint?The command timeout, if set.
Returns
- DbCommand
A command ready to run.
Type Parameters
T
GetCommand<T>(T, object?[], IDbConnection, IDbTransaction?, int?)
Builds a fresh command on cnn for the current builder values. Useful when you want
the command in hand rather than running it through one of the execution methods.
public static IDbCommand GetCommand<T>(T command, object?[] variables, IDbConnection cnn, IDbTransaction? transaction = null, int? timeout = null) where T : IQueryCommand
Parameters
commandTThe command whose text and parameters are produced from the values.
variablesobject[]The builder values driving the command.
cnnIDbConnectionThe connection to create the command on.
transactionIDbTransactionThe transaction to enlist, if any.
timeoutint?The command timeout, if set.
Returns
- IDbCommand
A command ready to run.
Type Parameters
T