MVC 2 - 如何在创建方法中排除多列
创建新客户时如何排除多个列?另一列是创建记录的日期 - 称为 customer_dt。
public ActionResult Create([Bind(Exclude = "customer_id")] Customer customer)
{
/* Do something here ... */
}
How can I exclude multiple columns when creating a new customer? The other column is the date that the record was created - called customer_dt.
public ActionResult Create([Bind(Exclude = "customer_id")] Customer customer)
{
/* Do something here ... */
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以将每个字段提供为逗号分隔列表。例如:
You may provide each field as a comma-separated list. For example: