Class DataMergeMapping<TEntity>
- Namespace
- FluentCommand.Merge
- Assembly
- FluentCommand.SqlServer.dll
Provides a fluent class for building strongly typed data merge mappings for a specific entity type.
public class DataMergeMapping<TEntity> : DataMergeMapping, IDataMergeMapping<TEntity>, IDataMergeMapping
Type Parameters
TEntity
The type of the entity used in the mapping.
- Inheritance
-
DataMergeMapping<TEntity>
- Implements
-
IDataMergeMapping<TEntity>
- Inherited Members
Constructors
DataMergeMapping(DataMergeDefinition)
Initializes a new instance of the DataMergeMapping<TEntity> class.
public DataMergeMapping(DataMergeDefinition mergeDefinition)
Parameters
mergeDefinition
DataMergeDefinitionThe DataMergeDefinition that defines the merge operation.
Methods
AutoMap()
Automatically maps all public properties of TEntity
as columns in the merge definition.
public IDataMergeMapping<TEntity> AutoMap()
Returns
- IDataMergeMapping<TEntity>
The current IDataMergeMapping<TEntity> instance for chaining.
Column<TValue>(Expression<Func<TEntity, TValue>>)
Begins configuration of a column mapping for the specified entity property.
public IDataColumnMapping Column<TValue>(Expression<Func<TEntity, TValue>> sourceProperty)
Parameters
sourceProperty
Expression<Func<TEntity, TValue>>An expression selecting the source property to map.
Returns
- IDataColumnMapping
An IDataColumnMapping interface for further column mapping configuration.
Type Parameters
TValue
The type of the property value.