更新时间:2022-12-20 15:35:21
刚刚找到答案,看来我放置RenderPartial代码的视图有一个动态模型,因此MVC无法选择正确的方法使用.将 RenderPartial 调用中的模型转换为正确的类型解决了该问题.
Just found the answer, it appears that the view where I was placing the RenderPartial code had a dynamic model, and thus, MVC couldn't choose the correct method to use. Casting the model in the RenderPartial call to the correct type fixed the issue.