iikoFront Api V7Preview7 Code Reference
iikoFront Api V7Preview7 Code Reference
Resto.Front.Api
IOperationService Interface
IOperationService Methods
ExecuteContinuousOperation Method
ExecuteContinuousOperation Method (Action(IOperationService))
ExecuteContinuousOperation(T) Method (Func(IOperationService, T))

# IOperationService ExecuteContinuousOperation Method (Action IOperationService )

Executes the callback function as one continuous operation by providing temporary instance of IOperationService, which holds internal locks taken on lockable entities (such as order) until the operation ends. It's strongly recommended to avoid potentially obstructive calls in the callback, i.e network calls, heavy I/O or CPU-bound calls, thread blocking and so on, because touched entities will remain locked for a long time.

Namespace: Resto.Front.Api
Assembly: Resto.Front.Api.V7Preview7 (in Resto.Front.Api.V7Preview7.dll) Version: 1ca4876affdd3bc5359a98b321fc115a647d2251
Syntax
C#
Copy

    void ExecuteContinuousOperation(
    	Action<IOperationService> continuousOperation
    )

#### Parameters

continuousOperation
  Type: System
  Action
  IOperationService
  Callback to be executed continuously.

Remarks
It could be useful for calling several methods of the local IOperationService instance sequentially when it's important to call them one by one without outside changes. While all committed changes will immediately become visible for everyone, no one except of the provided callback will be allowed to alter entities which were touched via that short-living IOperationService (input argument of the callback). For example, you can create a new order and add there guests, products and external prepay using one edit session, but you cannot print order items or process external prepay in the same session, because these operations can't be rolled back and thus aren't available via IEditSession. Executing these operations separately on a global Operations isn't reliable because there is a chance to be interrupted by a user, other plugin or background entity change handlers, which may prevent further our edits by applying conflicting changes or by locking an entity for a long time.
See Also

#### Reference

IOperationService Interface
ExecuteContinuousOperation Overload
Resto.Front.Api Namespace