R – SQL server data conversion using Microsoft Sync Framework

data-conversionmicrosoft-sync-frameworknet

We are analyzing Microsoft Sync Framework for syncing the client and server database. The scenario is like this:

Server DB hold master data for all projects but the client DB only contains data to a specific project. Moreover the schema of client and server database is also different. However the data is easily convertible.

Is there any way to achieve this using Microsoft Sync Framework?

Best Answer

It is convertible as long as:
1. the schema on the client is a subset of the Server
2. There are no extra schema columns on the client side

You can use the DbSyncProvider by attaching a DbSyncAdpater to its SyncAdapters collection. SyncAdapters can take care of column mappings. For data conversion, you may need to use events like ChangesSelected, ApplyingChanges, etc.

Related Topic