/// <summary> /// Sets the action to be invoked by hook. /// </summary> /// <param name="hookAction">The hook action.</param> public void Do(Action <T> hookAction) { _dbHookRegistrar.RegisterSaveHook(new DbHook <T>(hookAction)); }
/// <summary> /// Attaches the specified hook to be called for every entity save. /// </summary> /// <param name="hook">The hook.</param> /// <returns> /// This instance. /// </returns> public ISaveHookAttacher Attach(IDbHook hook) { _dbHookRegistrar.RegisterSaveHook(hook); return(this); }
/// <summary> /// Registers the hook. /// </summary> /// <param name="dbHookRegistrar">The database hook registrar.</param> /// <param name="hook">The hook.</param> protected override void RegisterHook(IDbHookRegistrar dbHookRegistrar, IDbHook hook) { dbHookRegistrar.RegisterSaveHook(hook); }