Table of Contents

Interface IMapperBuilder

Namespace
LinqToDB.Tools.Mapper
Assembly
linq2db.Tools.dll

Builds a mapper that maps an object of TFrom type to an object of TTo type.

public interface IMapperBuilder
Extension Methods

Properties

DeepCopy

If true, performs deep copy. if default (null), the GetMapperLambdaExpression() method does not do deep copy, however the GetMapperLambdaExpressionEx() method does.

bool? DeepCopy { get; set; }

Property Value

bool?

FromMappingDictionary

Defines member name mapping for source types.

Dictionary<Type, Dictionary<string, string>>? FromMappingDictionary { get; set; }

Property Value

Dictionary<Type, Dictionary<string, string>>

FromType

Type to map from.

[NotNull]
Type FromType { get; }

Property Value

Type

MappingSchema

Mapping schema.

[NotNull]
MappingSchema MappingSchema { get; set; }

Property Value

MappingSchema

MemberMappers

Member mappers.

List<MemberMapperInfo>? MemberMappers { get; set; }

Property Value

List<MemberMapperInfo>

ProcessCrossReferences

If true, processes object cross references. if default (null), the GetMapperLambdaExpression() method does not process cross references, however the GetMapperLambdaExpressionEx() method does.

bool? ProcessCrossReferences { get; set; }

Property Value

bool?

ToMappingDictionary

Defines member name mapping for destination types.

Dictionary<Type, Dictionary<string, string>>? ToMappingDictionary { get; set; }

Property Value

Dictionary<Type, Dictionary<string, string>>

ToMemberFilter

Filters target members to map.

Func<MemberAccessor, bool> ToMemberFilter { get; set; }

Property Value

Func<MemberAccessor, bool>

ToType

Type to map to.

[NotNull]
Type ToType { get; }

Property Value

Type

Methods

GetMapperLambdaExpression()

Returns a mapper expression to map an object of TFrom type to an object of TTo type. Returned expression is compatible to IQueryable.

LambdaExpression GetMapperLambdaExpression()

Returns

LambdaExpression

Mapping expression.

GetMapperLambdaExpressionEx()

Returns a mapper expression to map an object of TFrom type to an object of TTo type.

LambdaExpression GetMapperLambdaExpressionEx()

Returns

LambdaExpression

Mapping expression.