标签:
首先引入 automapper.dll using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace AutoMapper { class Program { static void Main(string[] args) { var order = new Order() { Id=1, OrderName="F", ClientName ="Aven", ClientId =2 }; var orderBrief = OrderBrief.Create(order); } } class Order { public Int32 Id { get; set; } public string OrderName { get; set; } public string ClientName { get; set; } public Int32 ClientId { get; set; } } class OrderBrief { #region Mapper实现对应 static OrderBrief() { var map = Mapper .CreateMap标签:
原文地址:http://www.cnblogs.com/zhshlimi/p/5409270.html