Hi All,
I am not able to implement Sync Framework on my application. I have some queries, searched through the web but din't find any solution. I am following the Sample WP7 Code which is provided in C:\Program Files\microsoft SDKs\MS Sync Framework\v4.0\Sample\WP7Application.
In that there is List Webservice, in that conflict handling is done.
I have a scenario when my WP7is changing the some columns of the entity. And simultaneous changes are done on the SQL Server on the same instance(on the same row) on some different columns. Conflict has occured, if in the service, I write
'SyncConflictResolution.ClientWins', it works fine. But I want to merge the changes in the instance, whenever I write
'SyncConflictResolution.Merge', I have to set the mergedEntity object as it is not allowing null value. I dont know how to do it. Can anyone tell me with example?
[SyncConflictInterceptor("DefaultScope")]
public SyncConflictResolution ConflictHandler(SyncConflictContext context, out IOfflineEntity mergedEntity)
{
// Add a dummy header to the response indicating that the interceptor method was invoked.
context.ResponseHeaders.Add("ConflictInterceptorFired", "true");
// The mergedEntity is used as the winner of the conflict
// when this method returns SyncConflictResolution.Merge as the resolution.
// For other resolutions such as SyncConflictResolution.ClientWins and SyncConflictResolution.ServerWins
// the mergedEntity should be set to null.
mergedEntity = null;
return SyncConflictResolution.Merge;
}
Can anyone tell me how to go ahead with this. Thanks in advance
Regards
Kushal