我有一个像这样的模型:
public class Invoice
{
int Code{get;set;}
List<InvoiceItem> InvoiceItems{get;set;}
}
我在表格中填写 InvoiceItems,我希望在控制器中将表格项作为 InvoiceItems
[HttpPost]
public virtual ActionResult Create(Invoice model)
{
//Save Invoice
return View();
}
如何填写 InvoiceItems 并将其发送到控制器?