/// <summary>
 /// Get the entities from the service
 /// </summary>
 /// <returns>The list of entities</returns>
 protected override IEnumerable <AzureSqlServerKeyVaultKeyModel> GetEntity()
 {
     return(new List <AzureSqlServerKeyVaultKeyModel>()
     {
         ModelAdapter.Get(this.ResourceGroupName, this.ServerName, this.KeyId)
     });
 }
        /// <summary>
        /// Gets an Azure Sql Server Key Vault Key.
        /// </summary>
        /// <returns>If a keyId is specified, a single Server Key Vault Key, otherwise, all the Server Key Vault Keys on the Server</returns>
        protected override IEnumerable <AzureSqlServerKeyVaultKeyModel> GetEntity()
        {
            IList <AzureSqlServerKeyVaultKeyModel> results = new List <AzureSqlServerKeyVaultKeyModel>();

            // If no KeyId is supplied, then list all the server key vault keys
            //
            if (!this.MyInvocation.BoundParameters.ContainsKey("KeyId"))
            {
                results = ModelAdapter.List(this.ResourceGroupName, this.ServerName);
            }
            else
            {
                results.Add(ModelAdapter.Get(this.ResourceGroupName, this.ServerName, KeyId));
            }

            return(results);
        }