AutoMapper用法

var mapConfig = new MapperConfiguration(cfg => cfg.CreateMap<SourceClass, DestinationClass>());
var mapper = mapConfig.CreateMapper();
var activit = mapper.Map<DestinationClass>(sourceObject);

posted @ 2019-07-04 15:40  male110  阅读(174)  评论(0编辑  收藏  举报