protected Management.Sql.SqlManagementClient GetSqlClient(RestTestFramework.MockContext context) { Management.Sql.SqlManagementClient client = context.GetServiceClient <Management.Sql.SqlManagementClient>( RestTestFramework.TestEnvironmentFactory.GetTestEnvironment()); return(client); }
/// <summary> /// Create a new sync member /// </summary> public Management.Sql.Models.SyncMember CreateSyncMember(string resourceGroupName, string serverName, string databaseName, string syncGroupName, string syncMemberName, string syncAgentId, Management.Sql.Models.SyncMember parameters) { Management.Sql.SqlManagementClient client = GetCurrentSqlClient(); if (syncAgentId != null) { parameters.SyncAgentId = string.Format("/subscriptions/{0}/{1}", Subscription.Id, syncAgentId); } return(client.SyncMembers.CreateOrUpdate(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, parameters)); }
protected Management.Sql.SqlManagementClient GetSqlClient(RestTestFramework.MockContext context) { Management.Sql.SqlManagementClient client = context.GetServiceClient <Management.Sql.SqlManagementClient>( RestTestFramework.TestEnvironmentFactory.GetTestEnvironment()); if (HttpMockServer.Mode == HttpRecorderMode.Playback) { client.LongRunningOperationRetryTimeout = 0; } return(client); }
/// <summary> /// Create a sync group /// </summary> public Management.Sql.Models.SyncGroup CreateSyncGroup(string resourceGroupName, string serverName, string databaseName, string syncDatabaseId, string syncGroupName, Management.Sql.Models.SyncGroup parameters) { Management.Sql.SqlManagementClient client = GetCurrentSqlClient(); parameters.SyncDatabaseId = syncDatabaseId == null ? null : string.Format("/subscriptions/{0}/{1}", Subscription.Id, syncDatabaseId); return(client.SyncGroups.CreateOrUpdate(resourceGroupName, serverName, databaseName, syncGroupName, parameters)); }