2

创建新客户时如何排除多个列?另一列是创建记录的日期 - 称为 customer_dt。

public ActionResult Create([Bind(Exclude = "customer_id")] Customer customer)
{
    /* Do something here ... */
}
4

1 回答 1

12

您可以将每个字段提供为逗号分隔的列表。例如:

 [Bind(Exclude="Customer_Id, Name,Description,Active")]
于 2010-08-10T19:36:46.510 回答