我有一个包含列表的类:
public class Client
{
public string FirstName { get; set; }
public string LastName { get; set; }
public List<Address> Addresses { get; set; }
}
如何将这种类型的对象从 View 传递到 Controller?
例如:
@Html.ActionLink("Edit", "Edit", item)
其中 item 是 Client 类型的对象。事实上,FirstName 和 LastName 传递成功,但 Addresses 传递为 NULL。
感谢任何帮助。