0
我有這樣Automapper的DTO到域
public class Person
{
public int id { get; set; }
public string name { get; set; }
public Gender gender { get; set; }
}
public class Gender
{
public int id { get; set; }
public string description { get; set; }
}
域的人的性別屬性是查找...從UI這意味着用戶選擇性別爲下拉
public class EmployeeDTO
{
public int personid { get; set; }
public string name { get; set; }
public int genderid { get; set; }
}
那麼如何設置我的AutoMapper ...將DTO轉換爲Domain和反之呢?