Rename Columns to ColumnName; add Attributes folder

Renamed the Columns property to ColumnName in EntityBaseOptions.cs,
updating all references accordingly. Added an "Attributes" folder
entry to ReC.Domain.csproj for future organization.
This commit is contained in:
2025-12-10 13:30:47 +01:00
parent 3caa6b9bd3
commit a6111cdc66
2 changed files with 6 additions and 2 deletions

View File

@@ -6,4 +6,8 @@
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<Folder Include="Attributes\" />
</ItemGroup>
</Project>

View File

@@ -2,11 +2,11 @@
public record EntityBaseOptions()
{
public Dictionary<string, string> Columns { get; init; } = [];
public Dictionary<string, string> ColumnName { get; init; } = [];
public void EnsureProperties(IEnumerable<string> propertyNames)
{
var missingProperties = propertyNames.Except(Columns.Select(col => col.Key)).ToList();
var missingProperties = propertyNames.Except(ColumnName.Select(col => col.Key)).ToList();
if (missingProperties.Count != 0)
throw new InvalidOperationException($"The following properties are not configured: {string.Join(", ", missingProperties)}");