Rename ColumnName to ColumnMappings in EntityBaseOptions
Renamed the ColumnName property to ColumnMappings in the EntityBaseOptions record for improved clarity and consistency. Updated all internal references accordingly; no changes to logic or initialization.
This commit is contained in:
@@ -4,11 +4,11 @@ namespace ReC.Infrastructure.Options.Shared;
|
||||
|
||||
public record EntityBaseOptions()
|
||||
{
|
||||
public Dictionary<string, string> ColumnName { get; init; } = [];
|
||||
public Dictionary<string, string> ColumnMappings { get; init; } = [];
|
||||
|
||||
public void EnsureProperties(IEnumerable<string> propertyNames)
|
||||
{
|
||||
var missingProperties = propertyNames.Except(ColumnName.Select(col => col.Key)).ToList();
|
||||
var missingProperties = propertyNames.Except(ColumnMappings.Select(col => col.Key)).ToList();
|
||||
|
||||
if (missingProperties.Count != 0)
|
||||
throw new InvalidOperationException($"The following properties are not configured: {string.Join(", ", missingProperties)}");
|
||||
|
||||
Reference in New Issue
Block a user