/// <summary> /// Allows to attach hooks that should be called while saving entities. /// </summary> /// <param name="objectContext">The object context.</param> /// <returns> /// Hook attacher. /// </returns> public static ISaveHookAttacher OnSave(this ObjectContext objectContext) { return(new SaveHookAttacher(objectContext.AsHookable())); }
/// <summary> /// Allows to attach hooks that should be called while loading entities. /// </summary> /// <param name="objectContext">The object context.</param> /// <returns> /// Hook attacher. /// </returns> public static ILoadHookAttacher OnLoad(this ObjectContext objectContext) { return(new LoadHookAttacher(objectContext.AsHookable())); }
/// <summary> /// Returns Fluent API interface for attaching hooks on <see cref="ObjectContext" />. /// </summary> /// <param name="objectContext">The object context.</param> /// <returns> /// Fluent api entry point. /// </returns> public static IHookSetup CreateHook(this ObjectContext objectContext) { return(new HookSetup(objectContext.AsHookable())); }