Another common question asked in the Sync Framework forums is on how to synchronize tables where the schema maybe the same but the table names are different.
For example you may have named your table on the client as ClientTable1 and simply named it Clients on the server or you may have named a table Sales on the client and named it ConsolidatedSales on the server side. Another example is where you’d like to sync your client tables to separate tables on the server side per client: Client1 – Table1, Client2 – Table1 becomes Client1Table1 and Client2Table on the server side.
Luckily, this scenario is actually supported by Sync Framework via the GlobalName property of the DbSyncTableDescription (see: http://msdn.microsoft.com/en-us/library/microsoft.synchronization.data.dbsynctabledescription_members.aspx). However, the documentation comes up short on any examples on how to use it.
Here’s a code snippet on how to use this property:
The property essentially allows you to map the local table name to a global name that the sync topology uses. This allows Sync Framework to map back the global name to the corresponding local table name during change enumeration/application.
Hope this helps.