C# net core AutoMapper 自动映射
public static T MapTo(this object obj) { return new MapperConfiguration(x => x.CreateMap(obj.GetType(), typeof(T))).CreateMapper().Map (obj); }
public static T MapTo(this object obj) { return new MapperConfiguration(x => x.CreateMap(obj.GetType(), typeof(T))).CreateMapper().Map (obj); }