Table of Contents

Class DataMergeColumnMapping

Namespace
FluentCommand.Merge
Assembly
FluentCommand.SqlServer.dll

Provides a fluent API for configuring a DataMergeColumn mapping for data merge operations.

public class DataMergeColumnMapping : IDataColumnMapping
Inheritance
DataMergeColumnMapping
Implements
Inherited Members

Constructors

DataMergeColumnMapping(DataMergeColumn)

Initializes a new instance of the DataMergeColumnMapping class.

public DataMergeColumnMapping(DataMergeColumn mergeColumn)

Parameters

mergeColumn DataMergeColumn

The DataMergeColumn instance to be configured.

Properties

MergeColumn

Gets the current DataMergeColumn being configured.

public DataMergeColumn MergeColumn { get; }

Property Value

DataMergeColumn

The DataMergeColumn instance being updated.

Methods

BulkCopy(bool)

Sets a value indicating whether the column is included in the bulk copy operation.

public IDataColumnMapping BulkCopy(bool value = true)

Parameters

value bool

true to include the column in bulk copy; otherwise, false. Default is true.

Returns

IDataColumnMapping

The same IDataColumnMapping instance for fluent chaining.

Ignore(bool)

Sets a value indicating whether the column is ignored and not used in the merge operation.

public IDataColumnMapping Ignore(bool value = true)

Parameters

value bool

true if the column is ignored; otherwise, false. Default is true.

Returns

IDataColumnMapping

The same IDataColumnMapping instance for fluent chaining.

Insert(bool)

Sets a value indicating whether the column can be inserted into the target table.

public IDataColumnMapping Insert(bool value = true)

Parameters

value bool

true if the column can be inserted; otherwise, false. Default is true.

Returns

IDataColumnMapping

The same IDataColumnMapping instance for fluent chaining.

Key(bool)

Sets a value indicating whether the column is used as part of the key for the merge operation. When set to true, the column is marked as a key and will not be updated.

public IDataColumnMapping Key(bool value = true)

Parameters

value bool

true if the column is part of the merge key; otherwise, false. Default is true.

Returns

IDataColumnMapping

The same IDataColumnMapping instance for fluent chaining.

NativeType(string)

Sets the SQL Server native data type for the SourceColumn(string).

public IDataColumnMapping NativeType(string value)

Parameters

value string

The SQL Server native data type (e.g., nvarchar(100), int).

Returns

IDataColumnMapping

The same IDataColumnMapping instance for fluent chaining.

SourceColumn(string)

Sets the source column name used to read from the source data.

public IDataColumnMapping SourceColumn(string value)

Parameters

value string

The name of the source column.

Returns

IDataColumnMapping

The same IDataColumnMapping instance for fluent chaining.

TargetColumn(string)

Sets the target column name in the destination table.

public IDataColumnMapping TargetColumn(string value)

Parameters

value string

The name of the target column.

Returns

IDataColumnMapping

The same IDataColumnMapping instance for fluent chaining.

Update(bool)

Sets a value indicating whether the column can be updated in the target table.

public IDataColumnMapping Update(bool value = true)

Parameters

value bool

true if the column can be updated; otherwise, false. Default is true.

Returns

IDataColumnMapping

The same IDataColumnMapping instance for fluent chaining.