0

How can I have provision a single ScopeProvision with multiple description. Currently I am doing like this and there should be a better way

       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();

And again while synchronizing we have to create multiple SyncOrchestrator. Cant we avoid this with cleaner once?

4

1 回答 1

1

你不能。范围描述定义了范围是什么。一个范围不能有多个定义。

如果您希望它们在一个范围内,那么您应该将所有表包含在一个范围内。

于 2013-01-24T01:05:59.943 回答