更新时间:2023-01-09 10:54:51
这里发生的是 Name
通过 构造函数.避免这种情况的一个简单方法是告诉 AM 要使用什么构造函数:
What happens here is that Name
is mapped through the constructor. A simple way to avoid that is to tell AM what constructor to use:
CreateMap<Match, ViewCompany>().ConstructUsing(source=>new ViewCompany());