Skip to content

Modify Model Prior Create, Update or Delete it IModelPreparar

Roi Shabtai (saturn) edited this page May 19, 2020 · 1 revision

IModelPreparar<>

To enable flexibility in manipulating model prior saving it to the database (via IRepository<>) you should use IModelPreparar<>. An instance of this interface is injected to CrudService<> and is called before performing IRepository<> craete or update action.

To set cross app IModelPreparar<> set the AnyServiceConfig.ModelPrepararType to required implementation. To set specific entity IModelPreparar<> set the entity EntityConfigRecord.ModelPrepararType to required implementation.