What is the cleanest way to execute code before and after an entity is saved.
EG: I want to save a "Person".
Before Save:
If age > 60 then set retired = true
Post Save:
If retired = true then email someone
I want these pre/post save behaviors to happen each time the entity is saved where it is through the SaveEntity or SaveEntityCollection method. Ideally, this would be part of my existing business layer. I know there is an "AfterSave" event, but i dont see a "BeforeSave" event.
Thanks,
Matt