映射器自动映射:
Mapper.CreateMap<ObjectType1, ObjectType2>()
.ForMember(o1 => o1.PropName, mapper => mapper.MapFrom(o2 => o2.Prop2Name));
Mapper.Map(object1, object2);
隐式运算符:
public static implicit operator Object1(Object2 o2)
{
Object1 o1 = new Object2();
//Mapping code here...
return o1;
}