Table of Contents

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

transaction IDbTransaction

The transaction to create a command from.

commandText string

The command text or stored procedure name to use.

secondsTimeout int

The 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

transaction DbTransaction

The transaction to create a command from.

commandText string

The command text or stored procedure name to use.

secondsTimeout int

The number of seconds to wait before the command times out.

Returns

DbCommand

The created SqlCommand.