From a826ddbfb1379d58d0773a82c6b41784e3e7cc13 Mon Sep 17 00:00:00 2001 From: Leon Hoppe Date: Mon, 19 Jan 2026 19:44:25 +0100 Subject: [PATCH] Fixed #37 --- .idea/.idea.HopFrame/.idea/workspace.xml | 27 ++++++++++--------- src/HopFrame.Core/Config/TableConfig.cs | 2 +- .../Implementations/ContextExplorer.cs | 8 ++++-- 3 files changed, 22 insertions(+), 15 deletions(-) diff --git a/.idea/.idea.HopFrame/.idea/workspace.xml b/.idea/.idea.HopFrame/.idea/workspace.xml index 70ed7a7..9dc017e 100644 --- a/.idea/.idea.HopFrame/.idea/workspace.xml +++ b/.idea/.idea.HopFrame/.idea/workspace.xml @@ -12,7 +12,9 @@ - + + + @@ -712,7 +715,6 @@ \ No newline at end of file diff --git a/src/HopFrame.Core/Config/TableConfig.cs b/src/HopFrame.Core/Config/TableConfig.cs index 668cc77..48e860b 100644 --- a/src/HopFrame.Core/Config/TableConfig.cs +++ b/src/HopFrame.Core/Config/TableConfig.cs @@ -63,7 +63,7 @@ public sealed class TableConfigurator(TableConfig config) { /// /// Determines if the table should be ignored in the admin ui /// - public TableConfigurator Ignore(bool ignore) { + public TableConfigurator Ignore(bool ignore = true) { InnerConfig.Ignored = ignore; return this; } diff --git a/src/HopFrame.Core/Services/Implementations/ContextExplorer.cs b/src/HopFrame.Core/Services/Implementations/ContextExplorer.cs index b839bf3..a088d0f 100644 --- a/src/HopFrame.Core/Services/Implementations/ContextExplorer.cs +++ b/src/HopFrame.Core/Services/Implementations/ContextExplorer.cs @@ -18,7 +18,9 @@ internal sealed class ContextExplorer(HopFrameConfig config, IServiceProvider pr public TableConfig? GetTable(string tableDisplayName) { foreach (var context in config.Contexts) { - var table = context.Tables.FirstOrDefault(table => table.DisplayName.Equals(tableDisplayName, StringComparison.CurrentCultureIgnoreCase)); + var table = context.Tables + .Where(t => !t.Ignored) + .FirstOrDefault(table => table.DisplayName.Equals(tableDisplayName, StringComparison.CurrentCultureIgnoreCase)); if (table is null) continue; SeedTableData(table); @@ -30,7 +32,9 @@ internal sealed class ContextExplorer(HopFrameConfig config, IServiceProvider pr public TableConfig? GetTable(Type tableEntity) { foreach (var context in config.Contexts) { - var table = context.Tables.FirstOrDefault(table => table.TableType == tableEntity); + var table = context.Tables + .Where(t => !t.Ignored) + .FirstOrDefault(table => table.TableType == tableEntity); if (table is null) continue; SeedTableData(table);