problem
When saving changes, EFCore only checks the concurrency token of a row when the entity is modified. Consider the folowing situation:
First I fetch record p. I'm not going to modify record p, but I want to ensure record p is unchanged until savechanges(). (like a SHARE lock)
solution
Force efcore to check the ConcurrencyToken of an entity. Maybe by executing SELECT 1 FROM students WHERE student_id=11 AND concurrency_token=55 FOR SHARE
and throw exception if null is returned.