Hello,
your synchronization is called concurrency problem and such problem has to be performed in database. I guess that each RDMS (relation database management system) has special type for row version which is used to handle optimistic concurrency. Row version column has special meaning, you can't set its value but the RDMS changes its value each time the record is modified. SQL server offers row version in Timestamp data type.
To use optimistic concurrency you need to add timestamp column to each table where you want to handle it. Then you have to use this column. You have to load it with each record and each update / delete has to use its value in WHERE clause. Then you have to test number of affecter records to know if the update / delete was successful and handle unsuccessful modification. This is general approach if you use DbCommand and DbDataReader related classed directly. LinqToSql, DataSets and Entity framework have same level of support for optimistic concurrency handling.
Btw. it is possible to use optimistic concurrency without Timestamp column but in that case you have to store updated values together with old values and then use old values in WHERE clause in update command.
Best regards,
Ladislav