diff --git a/src/ReC.Infrastructure/Options/Shared/EntityBaseOptions.cs b/src/ReC.Infrastructure/Options/Shared/EntityBaseOptions.cs index c9d343f..e7c94c6 100644 --- a/src/ReC.Infrastructure/Options/Shared/EntityBaseOptions.cs +++ b/src/ReC.Infrastructure/Options/Shared/EntityBaseOptions.cs @@ -6,9 +6,11 @@ public record EntityBaseOptions() { public Dictionary ColumnMappings { get; init; } = []; + public IEnumerable PropertyNames => ColumnMappings.Select(col => col.Key); + public void EnsureProperties(IEnumerable propertyNames) { - var missingProperties = propertyNames.Except(ColumnMappings.Select(col => col.Key)).ToList(); + var missingProperties = propertyNames.Except(PropertyNames).ToList(); if (missingProperties.Count != 0) throw new InvalidOperationException($"The following properties are not configured: {string.Join(", ", missingProperties)}");