My manager has a requirement where he wants the developer to personally set the ModifiedUserId field for any entity changes made to that entity. Therefore I have overridden the SaveChanges method so that we check the ModifiedUserId property of any modified entity to see if it has been set. If it has not been set we throw an error.
This works great except that our EF is using snapshot change detection so if ModifiedUserId is already 83, and the developer sets the value, per our requirements, to the same userid then the ModifiedUserId is not marked as a changed property so my check ultimately fails.
I have researched creating our own change proxies but have heard that it can be slow. Is there a way to have EF detect that we have in fact set the ModifiedUserId property even if it is the same while in snapshot mode? Any other ideas? Thank You.