Exemple #1
0
        /// <summary>
        /// Deletes the instance.
        /// </summary>
        /// <param name="entity">The instance being deleted</param>
        /// <returns>The instance that was deleted</returns>
        protected override IEnumerable <Model.AzureSqlManagedInstanceModel> PersistChanges(IEnumerable <Model.AzureSqlManagedInstanceModel> entity)
        {
            string replicaType = this.ReadableSecondary.IsPresent ? ReadableSecondaryReplica : PrimaryReplica;

            ModelAdapter.FailoverManagedInstance(this.ResourceGroupName, this.Name, replicaType);
            return(entity);
        }