Reputation:
Implementing ISupportLastWriteTime in sync framework 2.1 but there is not even a single piece of code on the internet.
http://msdn.microsoft.com/en-us/library/windows/desktop/dd744781(v=vs.85).aspx
I want to implement the Last writer wins in the sync framework 2.1
and i cannot add a new column in the existing tables.
I had created RelationalSyncProvider
private void LocalProvider_ApplyChangeFailed(object sender, DbApplyChangeFailedEventArgs e)
{
// ISupportLastWriteTime t = sender;
// t.GetChangeUnitChangeTime(
if (dbInfo.SynchronizeDirection == eSyncDirection.Download)
{
}
Here how can i implement ISupportLastWriteTime
Please help......
Upvotes: 1
Views: 104
Reputation: 7860
unfortunately, the RelationalSyncProvider lacks the the functionality to do Last Writer Wins type of resolution.
the easiest way to do this is to add a Last Update DateTime on your tables and when it fires a conflict, compare them and specify which row wins.
Upvotes: 1