Show / Hide Table of Contents

    Class BulkInsertColumnMapping

    Defines the mapping between a column in data source and a column in the destination table for IBulkInsert.

    Inheritance
    System.Object
    BulkInsertColumnMapping
    Namespace: Kros.Data.BulkActions
    Assembly: Kros.Utils.dll
    Syntax
    public class BulkInsertColumnMapping

    Constructors

    BulkInsertColumnMapping()

    Default constructor that initializes a new

    BulkInsertColumnMapping
    object.

    Declaration
    public BulkInsertColumnMapping()

    BulkInsertColumnMapping(Int32, Int32)

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

    Declaration
    public BulkInsertColumnMapping(int sourceOrdinal, int destinationOrdinal)
    Parameters
    Type Name Description
    System.Int32 sourceOrdinal

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

    System.Int32 destinationOrdinal

    The ordinal position of the destination column within the destination table.

    BulkInsertColumnMapping(Int32, String)

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

    Declaration
    public BulkInsertColumnMapping(int sourceOrdinal, string destinationName)
    Parameters
    Type Name Description
    System.Int32 sourceOrdinal

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

    System.String destinationName

    The name of the destination column within the destination table.

    BulkInsertColumnMapping(String, Int32)

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

    Declaration
    public BulkInsertColumnMapping(string sourceName, int destinationOrdinal)
    Parameters
    Type Name Description
    System.String sourceName

    The name of the source column within the data source.

    System.Int32 destinationOrdinal

    The ordinal position of the destination column within the destination table.

    BulkInsertColumnMapping(String, String)

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

    Declaration
    public BulkInsertColumnMapping(string sourceName, string destinationName)
    Parameters
    Type Name Description
    System.String sourceName

    The name of the source column within the data source.

    System.String destinationName

    The name of the destination column within the destination table.

    Properties

    DestinationName

    Name of the column being mapped in the destination database table. When set, DestinationOrdinal is set to

    -1
    .

    Declaration
    public string DestinationName { get; set; }
    Property Value
    Type Description
    System.String

    DestinationOrdinal

    Ordinal value of the destination column within the destination table. When set, DestinationName is set to empty string.

    Declaration
    public int DestinationOrdinal { get; set; }
    Property Value
    Type Description
    System.Int32
    Exceptions
    Type Condition
    System.IndexOutOfRangeException

    Value is less than 0.

    SourceName

    Name of the column being mapped in the data source. When set, SourceOrdinal is set to

    -1
    .

    Declaration
    public string SourceName { get; set; }
    Property Value
    Type Description
    System.String

    SourceOrdinal

    The ordinal position of the source column within the data source. When set, SourceName is set to empty string.

    Declaration
    public int SourceOrdinal { get; set; }
    Property Value
    Type Description
    System.Int32
    Exceptions
    Type Condition
    System.IndexOutOfRangeException

    Value is less than 0.

    Methods

    ToString()

    Returns mapping in a form "Source -> Destination".

    Declaration
    public override string ToString()
    Returns
    Type Description
    System.String

    String

    Overrides
    System.Object.ToString()
    Back to top KROS a.s.