IUndeleteBehavior interface

namespace: Serenity.Services   assemblySerenity.Net.Services

A undelete behavior that can be used as a mixin within a UndeleteRequestHandler lifecycle

public interface IUndeleteBehavior


name description
OnAfterUndelete(…) Called after row is undeleted in database
OnAudit(…) Called after row is undeleted and auditing should be performed
OnBeforeUndelete(…) Called just before row is undeleted in database
OnPrepareQuery(…) Called when query to load old entity is built
OnReturn(…) Called before handler is returning the result
OnValidateRequest(…) Called when undelete request is validated


A behavior instance is always cached and reused across requests, so make sure you don't store anything in private variables, and its operation is thread-safe. If you need to pass some state between events, use handler's StateBag.

See Also