<PackageReference Include="System.Data.SqlClient" Version="4.8.4" />

SqlBulkCopyColumnMapping

public sealed class SqlBulkCopyColumnMapping
Defines the mapping between a column in a SqlBulkCopy instance's data source and a column in the instance's destination table.
public string DestinationColumn { get; set; }

Name of the column being mapped in the destination database table.

public int DestinationOrdinal { get; set; }

Ordinal value of the destination column within the destination table.

public string SourceColumn { get; set; }

Name of the column being mapped in the data source.

public int SourceOrdinal { get; set; }

The ordinal position of the source column within the data source.

Parameterless constructor that initializes a new SqlBulkCopyColumnMapping object.

public SqlBulkCopyColumnMapping(int sourceColumnOrdinal, int destinationOrdinal)

Creates a new column mapping, using column ordinals to refer to source and destination columns.

public SqlBulkCopyColumnMapping(int sourceColumnOrdinal, string destinationColumn)

Creates a new column mapping, using a column ordinal to refer to the source column and a column name for the target column.

public SqlBulkCopyColumnMapping(string sourceColumn, int destinationOrdinal)

Creates a new column mapping, using a column name to refer to the source column and a column ordinal for the target column.

public SqlBulkCopyColumnMapping(string sourceColumn, string destinationColumn)

Creates a new column mapping, using column names to refer to source and destination columns.