//AutoMapper.Mapper.Map<Source, Destination>换成AutoMapper.Mapper.DynamicMap<Source, Destination>

//return Mapper.Map<TTarget>(source);//报错Missing type map configuration or unsupported mapping

//在实际映射的时候换成下面这个就可以啦
return Mapper.DynamicMap<TTarget>(source);

posted on 2015-11-19 10:28  zishen  阅读(640)  评论(0编辑  收藏  举报