If ILifecycle is deprecated, what is considered the best way to update an object to set a flag instead of deleting it?
With ILifecycle, I could just use :
Code:
public LifecycleVeto OnDelete( ISession s ) {
// Deactivate the object.
this.IsActive = false;
// Cancel the deletion. Let the object be updated with the new IsActive value instead.
return LifecycleVeto.Veto;
}
IInterceptor's OnDelete doesn't seem to suit my needs since 1) the comments say "It is not recommended that the interceptor modify the state" and 2) there doesn't seem to be a way to cancel the deletion in that method.