Suppose we have two entities Blog and Post that Blog has many Posts. Post is saved indirectly through Blog. When I override OnUpdate in Post, it causes to save Posts that have null Blog. In the other hand overriding OnUpdate in Post causes not saving it properly. Someone else have had same problem.
The code is:
protected override void OnUpdate()
{
UserModified = "UserModified";
DateModified = DateTime.Now;
base.OnUpdate();
}