摘要: AutoMapper是一个.NET的对象映射工具。项目地址:https://github.com/AutoMapper/AutoMapper。帮助文档:https://github.com/AutoMapper/AutoMapper/wiki主要用途领域对象与DTO之间的转换、数据库查询结果映射至实体对象。使用笔记场景1:源类型BlogEntry,目标类型BlogPostDto,指定属性进行映射(BlogEntry.ID对应于BlogPostDto.PostId)。代码:AutoMapper.Mapper.CreateMap() .ForMember(dto =>... 阅读全文
posted @ 2014-03-28 08:43 awp110 阅读(580) 评论(0) 推荐(0) 编辑