Add ColumnNames property to EntityBaseOptions
Added a new ColumnNames property that exposes the column names from the ColumnMappings dictionary as an IEnumerable<string> in the EntityBaseOptions record. This provides convenient access to mapped column names alongside existing property name access.
This commit is contained in:
@@ -8,6 +8,8 @@ public record EntityBaseOptions()
|
|||||||
|
|
||||||
public IEnumerable<string> PropertyNames => ColumnMappings.Select(col => col.Key);
|
public IEnumerable<string> PropertyNames => ColumnMappings.Select(col => col.Key);
|
||||||
|
|
||||||
|
public IEnumerable<string> ColumnNames => ColumnMappings.Select(col => col.Value);
|
||||||
|
|
||||||
public void EnsureProperties(IEnumerable<string> propertyNames)
|
public void EnsureProperties(IEnumerable<string> propertyNames)
|
||||||
{
|
{
|
||||||
var missingProperties = propertyNames.Except(PropertyNames).ToList();
|
var missingProperties = propertyNames.Except(PropertyNames).ToList();
|
||||||
|
|||||||
Reference in New Issue
Block a user