Method CreateStoredProcedureCommand
- Namespace
- Open.Database.Extensions
- Assembly
- Open.Database.Extensions.Core.dll
CreateStoredProcedureCommand(IDbTransaction, string, int)
Creates a stored procedure IDbCommand on the transaction's connection, enlisted in the transaction.
public static IDbCommand CreateStoredProcedureCommand(this IDbTransaction transaction, string procedureName, int secondsTimeout = 60)
Parameters
transactionIDbTransactionThe transaction to create the command from.
procedureNamestringThe stored procedure name.
secondsTimeoutintThe number of seconds to wait before the command times out. The default is 60 seconds.
Returns
- IDbCommand
A new IDbCommand that the caller owns and disposes. Its Transaction is
transaction.
Exceptions
- ArgumentException
procedureNameis empty or white space.- ArgumentNullException
transactionorprocedureNameis null.- InvalidOperationException
The transaction has no connection.
CreateStoredProcedureCommand(DbTransaction, string, int)
Creates a stored procedure DbCommand on the transaction's connection, enlisted in the transaction.
public static DbCommand CreateStoredProcedureCommand(this DbTransaction transaction, string procedureName, int secondsTimeout = 60)
Parameters
transactionDbTransactionThe transaction to create the command from.
procedureNamestringThe stored procedure name.
secondsTimeoutintThe number of seconds to wait before the command times out. The default is 60 seconds.
Returns
- DbCommand
A new DbCommand that the caller owns and disposes. Its Transaction is
transaction.
Exceptions
- ArgumentException
procedureNameis empty or white space.- ArgumentNullException
transactionorprocedureNameis null.- InvalidOperationException
The transaction has no connection.