Class Map
Mapper helper class.
public static class Map
- Inheritance
-
Map
Examples
This example shows how to map one object to another.
Methods
DeepCopy<T>(T)
Performs deep copy.
public static T DeepCopy<T>(this T obj)
Parameters
obj
TAn object to copy.
Returns
- T
Created object.
Type Parameters
T
Type of object.
GetMapper<TFrom, TTo>()
Returns a mapper to map an object of TFrom type to an object of TTo type.
public static Mapper<TFrom, TTo> GetMapper<TFrom, TTo>()
Returns
- Mapper<TFrom, TTo>
Mapping expression.
Type Parameters
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.
public static Mapper<TFrom, TTo> GetMapper<TFrom, TTo>(Func<MapperBuilder<TFrom, TTo>, MapperBuilder<TFrom, TTo>> setter)
Parameters
setter
Func<MapperBuilder<TFrom, TTo>, MapperBuilder<TFrom, TTo>>MapperBuilder parameter setter.
Returns
- Mapper<TFrom, TTo>
Mapping expression.
Type Parameters
TFrom
Type to map from.
TTo
Type to map to.