Business Operations. Implementation Class

The Business Operation class only describes the outer interface of the BO (i.e. its parameters). The business logic of the BO resides in the Business Operation Implementation class (or classes). Any BO can have one or several Implementations. It is possible to select any Implementation as the default one.

The BO Implementation class should implement the IOperationService interface. The base implementation of the interface is available in the OperationServiceBase abstract class. It is recommended to inherit it when programming one's own BO Implementations.

The code sample below demonstrates the Implementation class for the context-sensitive list BO described in the Business Operations Class topic.

As shown in the example, when using OperationServiceBase as a base class, it is often sufficient to override the Execute() abstract method that contains the logic of the Business Operation.

Also it is possible to implement a rollback of the BO if necessary. To do so, implement the IOperationServiceReversible interface that declares the Rollback() method.

To specify that the Implementation belongs to a certain BO, use BusinessOperationAttribute. To learn about other Implementation attributes, refer to the Business Operation Implementation Attributes topic.