RepositoryTBeforeSave Method

Performs any operations required before saving an entity.

Definition

Namespace: Ignition.Framework.Repositories
Assembly: CatalystFire.Ignition (in CatalystFire.Ignition.dll) Version: 12.0.3454
C#
protected virtual void BeforeSave(
	T entity
)

Parameters

entity  T
The entity that is about to be saved.

Remarks

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.

See Also