Exemplo n.º 1
0
        /// <summary>
        /// No changes to persist to Azure SQL Server
        /// </summary>
        /// <param name="entity">The output of apply user input to model</param>
        /// <returns>The input entity</returns>
        protected override IEnumerable <AzureReplicationLinkModel> PersistChanges(IEnumerable <AzureReplicationLinkModel> entity)
        {
            switch (ParameterSetName)
            {
            case ByFailoverParams:
                return(new List <AzureReplicationLinkModel>()
                {
                    ModelAdapter.FailoverLink(this.ResourceGroupName,
                                              this.ServerName,
                                              this.DatabaseName,
                                              this.PartnerResourceGroupName,
                                              this.AllowDataLoss.IsPresent)
                });

            default:
                // Warning user that no options were provided so no action can be taken.
                WriteWarning(Resources.SetSecondaryNoOptionProvided);
                break;
            }

            return(entity);
        }