【发布时间】:2009-11-09 15:37:07
【问题描述】:
假设我们有这样的东西
public class Person
{
public string Name {get; set;}
public Country Country {get; set;}
}
public class PersonViewModel
{
public Person Person {get; set;}
public SelectList Countries {get; set;}
}
是否可以使用 automapper 执行从 Person 解析到 PersonViewModel 并返回?
【问题讨论】:
-
是的,有可能,但是国家从哪里来?
-
我有类似 CountryService.GetCountries()