| DbContextDoInConnection Method (DbContextActionWithNoResult) |
Execute an action which doesn't return a value. If no current connection exists, it will establish a connection to the customer database and close it afterwards.
An existing connection will be reused. Inside the action, the connection is available as
Connection.
Namespace:
Omada.OE.AppLogic
Assembly:
Omada.OE.AppLogic (in Omada.OE.AppLogic.dll) Version: 15.0.0.0
Syntax
Examples
This will reuse an existing connection if one exists on the thread.
DbContext.DoInConnection(
delegate { DbContext.Connection.GetCommand().ExecuteNonQuery("Delete * FROM someTable"));
See Also