摘要:
创建和使用MapMapper.CreateMap<SourceType, DestinationType>() .ForMember(dest=> dest.Property, opt => opt.MapFrom(src => src.OtherProperty)) .ForMember(dest => dest.IgnoreProperty, opt => opt.Ignore()); 然后就可以使用这个Map了:DestinationType dest = Mapper.Map<SourceType, DestinationType> 阅读全文