If I want to do bi-directional mapping, do I need to create two mapping?
Mapper.CreateMap() and Mapper.CreateMap()
?
Yes, but if you find yourself doing this often:
public static class AutoMapperExtensions
{
public static void Bidirectional(this IMappingExpression expression)
{
Mapper.CreateMap();
}
}
then:
Mapper.CreateMap().Bidirectional();