Table of Contents

Class DataBulkCopyMapping<TEntity>

Namespace
FluentCommand.Bulk
Assembly
FluentCommand.SqlServer.dll

Provides a builder for configuring column mappings for IDataBulkCopy operations using strongly typed lambda expressions.

public class DataBulkCopyMapping<TEntity>

Type Parameters

TEntity

The type of the entity being mapped.

Inheritance
DataBulkCopyMapping<TEntity>
Inherited Members

Methods

Ignore<TValue>(Expression<Func<TEntity, TValue>>)

Ignores the specified source column by removing it from the mapped columns collection, using a lambda expression to specify the property.

public DataBulkCopyMapping<TEntity> Ignore<TValue>(Expression<Func<TEntity, TValue>> sourceProperty)

Parameters

sourceProperty Expression<Func<TEntity, TValue>>

A lambda expression representing the property of the source column to ignore.

Returns

DataBulkCopyMapping<TEntity>

The same DataBulkCopyMapping<TEntity> instance for fluent chaining.

Type Parameters

TValue

The type of the property value.

Mapping<TValue>(Expression<Func<TEntity, TValue>>)

Creates a new column mapping using a lambda expression to refer to both the source and destination columns by property name.

public DataBulkCopyMapping<TEntity> Mapping<TValue>(Expression<Func<TEntity, TValue>> sourceProperty)

Parameters

sourceProperty Expression<Func<TEntity, TValue>>

A lambda expression representing the property of the source column for the mapping.

Returns

DataBulkCopyMapping<TEntity>

The same DataBulkCopyMapping<TEntity> instance for fluent chaining.

Type Parameters

TValue

The type of the property value.

Mapping<TValue>(Expression<Func<TEntity, TValue>>, int)

Creates a new column mapping using a lambda expression to refer to the source column and a column ordinal for the destination column.

public DataBulkCopyMapping<TEntity> Mapping<TValue>(Expression<Func<TEntity, TValue>> sourceProperty, int destinationOrdinal)

Parameters

sourceProperty Expression<Func<TEntity, TValue>>

A lambda expression representing the property of the source column for the mapping.

destinationOrdinal int

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

Returns

DataBulkCopyMapping<TEntity>

The same DataBulkCopyMapping<TEntity> instance for fluent chaining.

Type Parameters

TValue

The type of the property value.

Mapping<TValue>(Expression<Func<TEntity, TValue>>, string)

Creates a new column mapping using a lambda expression to refer to the source column and a column name for the destination column.

public DataBulkCopyMapping<TEntity> Mapping<TValue>(Expression<Func<TEntity, TValue>> sourceProperty, string destinationColumn)

Parameters

sourceProperty Expression<Func<TEntity, TValue>>

A lambda expression representing the property of the source column for the mapping.

destinationColumn string

The name of the destination column within the destination table.

Returns

DataBulkCopyMapping<TEntity>

The same DataBulkCopyMapping<TEntity> instance for fluent chaining.

Type Parameters

TValue

The type of the property value.