Method CreateTextCommand
- Namespace
- Open.Database.Extensions
- Assembly
- Open.Database.Extensions.Core.dll
CreateTextCommand(IDbTransaction, string, int)
Shortcut for creating a text IDbCommand from any IDbTransaction.
public static IDbCommand CreateTextCommand(this IDbTransaction transaction, string commandText, int secondsTimeout = 60)
Parameters
transactionIDbTransactionThe transaction to create a command from.
commandTextstringThe command text or stored procedure name to use.
secondsTimeoutintThe number of seconds to wait before the command times out.
Returns
- IDbCommand
The created SqlCommand.
CreateTextCommand(DbTransaction, string, int)
Shortcut for creating a text DbCommand from any DbTransaction.
public static DbCommand CreateTextCommand(this DbTransaction transaction, string commandText, int secondsTimeout = 60)
Parameters
transactionDbTransactionThe transaction to create a command from.
commandTextstringThe command text or stored procedure name to use.
secondsTimeoutintThe number of seconds to wait before the command times out.
Returns
- DbCommand
The created SqlCommand.