Ejemplo n.º 1
0
        /// <summary>
        /// No changes to persist to server
        /// </summary>
        /// <param name="entity">The output of apply user input to model</param>
        /// <returns>The input entity</returns>
        protected override IEnumerable <AzureSqlDatabaseModel> PersistChanges(IEnumerable <AzureSqlDatabaseModel> entity)
        {
            string replicaType = this.ReadableSecondary.IsPresent ? ReadableSecondaryReplica : PrimaryReplica;

            ModelAdapter.FailoverDatabase(this.ResourceGroupName, this.ServerName, this.DatabaseName, replicaType);
            return(entity);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// No changes to persist to server
 /// </summary>
 /// <param name="entity">The output of apply user input to model</param>
 /// <returns>The input entity</returns>
 protected override IEnumerable <AzureSqlDatabaseModel> PersistChanges(IEnumerable <AzureSqlDatabaseModel> entity)
 {
     ModelAdapter.FailoverDatabase(this.ResourceGroupName, this.ServerName, this.DatabaseName);
     return(entity);
 }