Override Save method in the entities you want. You can do this in a partial class:
namespace <yourProjectName>.EntityClasses
{
public partial class MyXEntity
{
public override bool Save(IPredicate updateRestriction, bool recurse)
{
// your custom save code
...
}
}
}
You can modify templates so you can include the above partial class method in all entities.
You can also use AfterSave() EventHandler to add some extra code after save.
You can also (in v2.5, now in Beta, soon in Release) inject Auditors, Validators and Authorizers to your entites, which is more suitable in these cases.
Which of those approaches is better in your project?