RepositoryTBeforeSave Method
Performs any operations required before saving an entity.
Namespace: Ignition.Framework.RepositoriesAssembly: CatalystFire.Ignition (in CatalystFire.Ignition.dll) Version: 12.0.3454
protected virtual void BeforeSave(
T entity
)
Protected Overridable Sub BeforeSave (
entity As T
)
protected:
virtual void BeforeSave(
T entity
)
abstract BeforeSave :
entity : 'T -> unit
override BeforeSave :
entity : 'T -> unit
Parameters
- entity T
- The entity that is about to be saved.
Notes for Inheritors
This method is called directly before the passed entity is saved to netFORUM.
The primary purpose for overriding this method in a derived repository, is to perform pre-save validation in order
to catch problems with entities to be saved before netFORUM does.
For example, netFORUM may throw difficult to understand errors if certain fields it deems required are not filled in,
and by implementing this method, custom repositories have a chance to detect the issue, and throw an easier to understand exception.