RelationalSyncProvider::SyncProviderPosition Property
Gets or sets a SyncProviderPosition enumeration value that represents whether a provider is associated with the local or remote database.
Assembly: Microsoft.Synchronization.Data (in Microsoft.Synchronization.Data.dll)
public: property SyncProviderPosition SyncProviderPosition { SyncProviderPosition get (); void set (SyncProviderPosition value); }
Property Value
Type: Microsoft.Synchronization::SyncProviderPositionA SyncProviderPosition enumeration value that represents whether a provider is associated with the local or remote database.
The following code example instantiates local and remote providers and calls the SetupSyncProvider method in a sample class that was created for this documentation. This method is used so that providers can be configured easily for multiple nodes. Several provider commands are specified within this method. For more information about these commands and to view this code in the context of a complete example, see How to: Synchronize Other ADO.NET Compatable Databases.
DbSyncProvider localProvider = new DbSyncProvider(); DbSyncProvider remoteProvider = new DbSyncProvider(); //Create a provider by using the SetupSyncProvider on the sample class. sampleSyncProvider.SetupSyncProvider(localProviderConnString, localProvider); localProvider.SyncProviderPosition = SyncProviderPosition.Local; sampleSyncProvider.SetupSyncProvider(remoteProviderConnString, remoteProvider); remoteProvider.SyncProviderPosition = SyncProviderPosition.Remote;
Dim localProvider As New DbSyncProvider() Dim remoteProvider As New DbSyncProvider() 'Create a provider by using the SetupSyncProvider on the sample class. sampleSyncProvider.SetupSyncProvider(localProviderConnString, localProvider) localProvider.SyncProviderPosition = SyncProviderPosition.Local sampleSyncProvider.SetupSyncProvider(remoteProviderConnString, remoteProvider) remoteProvider.SyncProviderPosition = SyncProviderPosition.Remote
Show: