2013-01-23 69 views
0

如何爲多個描述提供單個ScopeProvision。目前,我如何使用單一ScopeProvision提供多個範圍描述

 DbSyncScopeDescription scopeDesc1 = SqlSyncDescriptionBuilder.GetDescriptionForScope("Scope1", serverConnection); 
     DbSyncScopeDescription scopeDesc2 = SqlSyncDescriptionBuilder.GetDescriptionForScope("Scope2 ", serverConnection); 
     DbSyncScopeDescription scopeDesc3 = SqlSyncDescriptionBuilder.GetDescriptionForScope("Scope3", serverConnection); 



     SqlCeSyncScopeProvisioning clientProvision1 = new SqlCeSyncScopeProvisioning(localConnection, scopeDesc1); 
     SqlCeSyncScopeProvisioning clientProvision2 = new SqlCeSyncScopeProvisioning(localConnection, scopeDesc2); 
     SqlCeSyncScopeProvisioning clientProvision3 = new SqlCeSyncScopeProvisioning(localConnection, scopeDesc3); 


     clientProvision1.Apply(); 
     clientProvision2.Apply(); 
     clientProvision3.Apply(); 

並再次做這樣的並且應該有一個更好的辦法,而同步,我們必須創建多個SyncOrchestrator。我們不能用清潔劑避免這種情況嗎?

回答

1

你不能。範圍說明定義了範圍。範圍不能有多個定義。

如果您希望它們在一個範圍內,那麼您應該將所有表包括在一個範圍內。