Added property validation

This commit is contained in:
2025-01-16 16:16:50 +01:00
parent c3c69466d4
commit d8596aa5e1
5 changed files with 101 additions and 24 deletions

View File

@@ -65,6 +65,13 @@ internal sealed class ContextExplorer(HopFrameConfig config, IServiceProvider pr
propConfig.IsRelation = true;
}
foreach (var property in entity.GetProperties()) {
var propConfig = table.Properties
.SingleOrDefault(prop => prop.Info == property.PropertyInfo);
if (propConfig is null) continue;
propConfig.IsRequired = !property.IsNullable;
}
logger.LogInformation("Extracted information for table '" + table.PropertyName + "'");
table.Seeded = true;
}