1
我认为标题已经很好地解释了问题。我有一个源类型:使用Automapper自定义映射,其中目标中的字段是源中两个字段的串联
public class Employee
{
public string Name { get; set; }
public string DateOfBirth { get; set; }
public string srcImage { get; set; }
public string Email { get; set; }
public string Role { get; set; }
}
和
public class EmployeeViewModel
{
public string Name { get; set; }
public string Surname { get; set; }
public string DateOfBirth { get; set; }
public string Email { get; set; }
public string Role { get; set; }
}
我想用automapper从EmployeeViewModel转化为员工和名员工的是名和姓串联在EmployeeViewModel中。
请问您能否介绍一下如何设置MapperConfiguration?谢谢!