Fixed #37
This commit is contained in:
@@ -63,7 +63,7 @@ public sealed class TableConfigurator<TModel>(TableConfig config) {
|
||||
/// <summary>
|
||||
/// Determines if the table should be ignored in the admin ui
|
||||
/// </summary>
|
||||
public TableConfigurator<TModel> Ignore(bool ignore) {
|
||||
public TableConfigurator<TModel> Ignore(bool ignore = true) {
|
||||
InnerConfig.Ignored = ignore;
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user