RepositoryModeUtilsSetRepositoryMode Method |
Namespace: PDTec.IceNet.Sdk.Utils
public static void SetRepositoryMode( IDatabaseRepository pRepository, RepositoryMode mode )
This method contains the transaction scope, in contrast to all other utility methods. This is required because changing the repository mode disables committing all regular pending transactions. Therefore this method should not be called within a transactional context.
After changing the repository mode the current repository instance is no longer valid and should be discarded. Any following repository actions should be performed on a new repository instance.
In order to receive a valid repository instance wait 5 seconds after calling this method before requesting a new repository instance. This allows the internal caches to refresh the repository status.