Interface IBaseDataSetProcessorWithDBSave
These processors automatically integrate with the LemonEdge SaveChanges(CancellationToken, Boolean, DbTransaction) operation
Any custom processes that you want to run during a save process can be integrated using this interface and custom IBaseDataSetProcessor functionality
The system uses this for enforcing processes on save such as some of the transaction engine functionality like cancel/correct technologyInherited Members
Namespace: LemonEdge.API.Processors
Assembly: API.dll
Syntax
public interface IBaseDataSetProcessorWithDBSave : IBaseDataSetProcessor, IProcessor, IDisposable
Properties
Order
If we have multiple save processors working, this indicates the order in which they will be processed with relation to each other
Declaration
short Order { get; }
Property Value
Type | Description |
---|---|
System.Int16 |
SaveProcessed
Indicates the ProcessOnDBSave has already been run. This is set by the system during save, and prevents recursive calls.
It is also released by the system on save completion/failure
Declaration
bool SaveProcessed { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Methods
ProcessOnDBSave()
Will only run when connected to the database directly.
i.e. in the web service or in a client connected to the db service, not in a client connected to the web service.
For the client connected to the webservice, as part of the webservices save routine it will call this.Declaration
Task ProcessOnDBSave()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
RollbackChanges()
During process on db save, the context can be left in an inconsistent state if it fails any validation. This is called if the transactional save failed and the context must be put back to a consistent state similar to before ProcessOnDBSave was called.
Most processors are fine running again after a failed transaction save has been fixed by the user.
However some require work to be undone such as cancel/correct objects being created for transactions. The cancel/correct transactions need to be removed.Declaration
virtual Task RollbackChanges()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Remarks
When running in a service this will be disposed of anyway, it is only relevant for when the client is directly connected to the database server.