static void Main(string[] args)
        {
            //<snippetOCSv2_CS_Basic_NTier_SyncOrchestrator>
            KnowledgeSyncProvider localProvider;
            KnowledgeSyncProvider remoteProvider;

            string localConnection = @"Data Source = localhost; Initial Catalog = SyncSamplesDb_Peer1; " +
                                     "Integrated Security = True";
            string remoteConnection = @"http://localhost:8000/Sync/SyncService";
            string scopeName        = "Sales";

            SampleSyncProvider sampleSyncProvider = new SampleSyncProvider();

            localProvider  = sampleSyncProvider.SetupSyncProvider(scopeName, localConnection);
            remoteProvider = new SyncProxy(scopeName, remoteConnection);

            SyncOrchestrator syncOrchestrator = new SyncOrchestrator();

            syncOrchestrator.LocalProvider  = localProvider;
            syncOrchestrator.RemoteProvider = remoteProvider;

            syncOrchestrator.Direction = SyncDirectionOrder.Download;
            syncOrchestrator.Synchronize();
            //</snippetOCSv2_CS_Basic_NTier_SyncOrchestrator>
        }
        public void BeginSession(string scopeName)
        {
            string localConnection = @"Data Source = localhost; Initial Catalog = SyncSamplesDb_Peer2; " +
                                     "Integrated Security = True";
            SampleSyncProvider sampleSyncProvider = new SampleSyncProvider();

            peerProvider = sampleSyncProvider.SetupSyncProvider(scopeName, localConnection);
        }