Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
这可能已经出现过,并且可能非常主观。我一直避免使用 ViewData 并使用 FromViewModel 类将信息传递给视图。
这种方法有什么主要优点吗?
谢谢
戴维
ViewData 不是强类型,而 Models 是。因此模型不易出错且更清晰。