diff --git a/src/Network/Network/Cortex/ExpressRouteGateway/ExpressRouteConnection/RemoveAzureRmExpressRouteConnectionCommand.cs b/src/Network/Network/Cortex/ExpressRouteGateway/ExpressRouteConnection/RemoveAzureRmExpressRouteConnectionCommand.cs index fdfe7e438561..59a124b95c7d 100644 --- a/src/Network/Network/Cortex/ExpressRouteGateway/ExpressRouteConnection/RemoveAzureRmExpressRouteConnectionCommand.cs +++ b/src/Network/Network/Cortex/ExpressRouteGateway/ExpressRouteConnection/RemoveAzureRmExpressRouteConnectionCommand.cs @@ -79,13 +79,7 @@ public class RemoveExpressRouteConnectionCommand : ExpressRouteConnectionBaseCmd public override void Execute() { - if (ParameterSetName.Equals(CortexParameterSetNames.ByExpressRouteConnectionName, StringComparison.OrdinalIgnoreCase)) - { - this.ResourceGroupName = this.ResourceGroupName; - this.ExpressRouteGatewayName = this.ExpressRouteGatewayName; - this.Name = this.Name; - } - else if (ParameterSetName.Equals(CortexParameterSetNames.ByExpressRouteConnectionObject, StringComparison.OrdinalIgnoreCase)) + if (ParameterSetName.Equals(CortexParameterSetNames.ByExpressRouteConnectionObject, StringComparison.OrdinalIgnoreCase)) { this.ResourceId = this.InputObject.Id;