【发布时间】:2013-04-09 14:50:10
【问题描述】:
以下是错误类型传入强类型视图时的错误消息示例:
The model item passed into the dictionary is of type 'foo', but this dictionary requires a model item of type 'bar'.
这个错误提示“这本词典”需要不同的模型。我的问题是,为什么是“字典”?如果错误消息说“此类需要'bar'类型的模型项”,对我来说会更有意义。
错误信息指的是什么字典?
【问题讨论】:
-
模型被序列化为表单数据的字典。
标签: c# asp.net-mvc-3 view model