Click or drag to resize

ControllerBaseDoInConnection Method (ActionSqlConnection, SqlTransaction, Boolean)

Executes an action that doesn't return a result. If no current connection exists, it will establish a connection to the database and close it afterwards. Connection and Transaction are passed to delegate, to allow passing to other controllers An existing connection will be reused. Inside the action, the connection is available as DbConnection. To ensure a new connection set forceNew to true.

Namespace:  Omada.OE.AppLogic
Assembly:  Omada.OE.AppLogic (in Omada.OE.AppLogic.dll) Version: 15.0.0.0
Syntax
C#
public virtual void DoInConnection(
	Action<SqlConnection, SqlTransaction> action,
	bool forceNew = false
)

Parameters

action
Type: SystemActionSqlConnection, SqlTransaction
forceNew (Optional)
Type: SystemBoolean
Set to true to ensure new connection and transaction instead of reusing the one already on controller
See Also