public override void ExecuteCmdlet()

in src/Modules/Data/Commands.Data/GetPowerBITable.cs [79:120]


        public override void ExecuteCmdlet()
        {
            if (this.Dataset != null)
            {
                this.DatasetId = this.Dataset.Id;
            }

            if (this.Workspace != null)
            {
                this.WorkspaceId = this.Workspace.Id;
            }
            
            IEnumerable<Table> tables = null;
            using (var client = this.CreateClient())
            {
                if (this.WorkspaceId != default)
                {
                    tables = client.Datasets.GetTables(this.DatasetId, this.WorkspaceId);
                }
                else
                {
                    tables = client.Datasets.GetTables(this.DatasetId);
                }
            }

            if (!string.IsNullOrEmpty(this.Name))
            {
                tables = tables?.Where(d => d.Name.Equals(this.Name, StringComparison.OrdinalIgnoreCase));
            }

            if (this.Skip.HasValue)
            {
                tables = tables?.Skip(this.Skip.Value);
            }

            if (this.First.HasValue)
            {
                tables = tables?.Take(this.First.Value);
            }

            this.Logger.WriteObject(tables, true);
        }