Sync Framework : Can I Sync only a subset of my tables?

后端 未结 2 990
刺人心
刺人心 2021-01-16 03:33

The regular code snippet of syncing data with sync framework is this:

LocalDBSyncAgent syncAgent = new LocalDBSyncAgent();
Microsoft.Synchronization.Data.Syn         


        
2条回答
  •  孤独总比滥情好
    2021-01-16 03:47

    There are some new database related sync providers in Sync Framework 2.0 - they have a number of benefits over the ones that were previously available (see Comparing Provider Types here). With these, you can specify that a subset of tables should be synchronized by building a DbSyncScopeDescription that contains DbSyncTableDescriptions for only those tables that you wish to synchronize.

    You stated above that you are not interested in filtering the data but it is probably worth mentioning here that a DbSyncScopeDescription also contains filtering information.

提交回复
热议问题