Class Map
Mapper helper class.
Namespace: LinqToDB.Tools.Mapper
Assembly: linq2db.Tools.dll
Syntax
public static class Map
Examples
This example shows how to map one object to another.
Methods
| Improve this Doc View SourceDeepCopy<T>(T)
Performs deep copy.
Declaration
public static T DeepCopy<T>(this T obj)
Parameters
Type | Name | Description |
---|---|---|
T | obj | An object to copy. |
Returns
Type | Description |
---|---|
T | Created object. |
Type Parameters
Name | Description |
---|---|
T | Type of object. |
GetMapper<TFrom, TTo>()
Returns a mapper to map an object of TFrom type to an object of TTo type.
Declaration
public static Mapper<TFrom, TTo> GetMapper<TFrom, TTo>()
Returns
Type | Description |
---|---|
Mapper<TFrom, TTo> | Mapping expression. |
Type Parameters
Name | Description |
---|---|
TFrom | Type to map from. |
TTo | Type to map to. |
GetMapper<TFrom, TTo>(Func<MapperBuilder<TFrom, TTo>, MapperBuilder<TFrom, TTo>>)
Returns a mapper to map an object of TFrom type to an object of TTo type.
Declaration
public static Mapper<TFrom, TTo> GetMapper<TFrom, TTo>(Func<MapperBuilder<TFrom, TTo>, MapperBuilder<TFrom, TTo>> setter)
Parameters
Type | Name | Description |
---|---|---|
Func<MapperBuilder<TFrom, TTo>, MapperBuilder<TFrom, TTo>> | setter | MapperBuilder parameter setter. |
Returns
Type | Description |
---|---|
Mapper<TFrom, TTo> | Mapping expression. |
Type Parameters
Name | Description |
---|---|
TFrom | Type to map from. |
TTo | Type to map to. |