Method CreateMap
- Namespace
- Mapperion
- Assembly
- Mapperion.dll
CreateMap<TSource, TDestination>()
Declares a map between two types.
IMappingExpression<TSource, TDestination> CreateMap<TSource, TDestination>()
Returns
- IMappingExpression<TSource, TDestination>
The expression used to configure the map.
Type Parameters
TSourceThe source type.
TDestinationThe destination type.
Exceptions
- MapperConfigurationException
The pair was already declared.
CreateMap(Type, Type)
Declares a map with types rather than type arguments. Pass two generic type definitions,
such as typeof(Page<>) and typeof(PageDto<>), to declare a
template the engine closes the first time a matching pair is mapped.
IOpenMappingExpression CreateMap(Type sourceType, Type destinationType)
Parameters
Returns
- IOpenMappingExpression
The expression used to configure the map.
Exceptions
- ArgumentNullException
Either argument is null.
- MapperConfigurationException
The pair was already declared, or only one side is open.