Link Search Menu Expand Document

FirebirdCommandBatcherColumnMappingCollection


This class is a Collection<FirebirdCommandBatcherMapItem> used to define the source-to-destination column mappings of a FirebirdCommandBatcher.

It backs FirebirdCommandBatcher’s ColumnMappings property. Its Add(sourceColumn, destinationColumn) overload creates and appends a FirebirdCommandBatcherMapItem; an explicit FbDbType for a mapping can instead be added directly via the base Collection<T>.Add(FirebirdCommandBatcherMapItem).

Usability

using var batcher = new FirebirdCommandBatcher(connection)
{
    DestinationTableName = "\"Person\""
};

batcher.ColumnMappings.Add("FirstName", "FName");
batcher.ColumnMappings.Add("LastName", "LName");
batcher.ColumnMappings.Add(new FirebirdCommandBatcherMapItem("Photo", "Photo", FbDbType.Binary));

When ColumnMappings is left empty, FirebirdCommandBatcher maps every source column to a destination column of the same name.