如何将复杂的 UploadDTO 映射到实体编号?
public class UploadDTO
{
public CustomerDTO Customer { get; set; }
public MachineDTO Machine { get; set; }
public NumberDTO Number { get; set; }
}
public class Number
{
public Customer Customer { get; set; }
public Machine Machine { get; set; }
}
更新
Mapper.CreateMap<CustomerDTO , Customer >();
Mapper.CreateMap<MachineDTO , Machine >();
Mapper.CreateMap<NumberDTO , Number>();
问题是缺少 UploadDTO 映射,因此它不起作用。但我怎么能说:“以 UploadDTO.Customer TO Customer 为例?”