-
Notifications
You must be signed in to change notification settings - Fork 0
Data Manager
The data manager is a manager for the users data that controls how data is processed. It should act like a unit of work class.
To create your own you can inherit from the IDataManager interface.
The data manager needs to implment the following methods.
The read method should use the data worker to get the data object requeeted.
The overload of read takes in a list of Ids and should simple call the read method multiple times.
This method should use the data worker to get all the data object for the type and return all.
This method should use the index worker to get the ids from the index with the key and then call read many to return the results.
This method should write data using the data worker and handle calling the audit and index works when needed.
This method should use the data worker to delete the data and handle calling the audit and index works when needed.
This method should use the data worker to restore data that was soft deleted and handle calling the audit and index works when needed.
This method should use the data worker to get the next available id for the data type
This method should use the audit worker to get the audit log for the requested data object.
The default data manager handles alot of the havy work of calling the works in the right order but if you need to change this or want to add in extra bits then you will need to implment your own data manager however you might be able to inherit from the default one and override the methods you want to change or provide extra methods that are not provided as standard.